From 0b49dcff947db63cd1d544e0d871bda246afbc5b Mon Sep 17 00:00:00 2001 From: Daniel Bergman Date: Thu, 7 Nov 2024 16:19:19 -0500 Subject: [PATCH] fix bug reading large random seeds --- modules/PhysiCell_settings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/PhysiCell_settings.cpp b/modules/PhysiCell_settings.cpp index 3937fb8c6..0eb13f81a 100644 --- a/modules/PhysiCell_settings.cpp +++ b/modules/PhysiCell_settings.cpp @@ -273,9 +273,9 @@ void PhysiCell_Settings::read_from_pugixml( void ) } else { - int seed; + unsigned int seed; try - { seed = std::stoi(random_seed); } + { seed = std::stoul(random_seed); } catch(const std::exception& e) { std::cout << "ERROR: " << random_seed << " is not a valid random seed. It must be an integer. Fix this within ." << std::endl;