From 6650fd799696455b4a2778b9bb9a3f5a39d7779b Mon Sep 17 00:00:00 2001 From: Austin Raney Date: Thu, 12 Sep 2024 09:46:01 -0400 Subject: [PATCH] fix: seek to beginning of config file after looking for verbose key; fixes #32 --- src/lgar.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lgar.cxx b/src/lgar.cxx index f5a497d..6c253a0 100755 --- a/src/lgar.cxx +++ b/src/lgar.cxx @@ -205,6 +205,8 @@ extern void InitFromConfigFile(string config_file, struct model_state *state) } } + // seek to beginning of input after searching for 'verbosity' + fp.seekg(0, fp.beg); if (verbosity.compare("none") != 0) { std::cerr<<"------------- Initialization from config file ---------------------- \n"; @@ -2646,4 +2648,4 @@ extern double lgar_theta_mass_balance(int layer_num, int soil_num, double psi_cm } -#endif \ No newline at end of file +#endif