From 7552f8f680a41d12454080cc1174765c86bb6354 Mon Sep 17 00:00:00 2001 From: Darth Vader Date: Mon, 27 May 2024 19:32:06 +0000 Subject: [PATCH] Squashed 'src/' changes from 70e32eba..fb3f60ce fb3f60ce Merge commit '09af2d5b127a8efe403f47751c7c8465ec94874d' 09af2d5b Squashed 'phreeqcpp/' changes from cb6d9f4..3d5242f git-subtree-dir: src git-subtree-split: fb3f60ce26395696273caf5cdf9f3415fca60d5a --- phreeqcpp/tidy.cpp | 10 ++++++++++ phreeqcpp/utilities.cpp | 4 ++++ 2 files changed, 14 insertions(+) diff --git a/phreeqcpp/tidy.cpp b/phreeqcpp/tidy.cpp index 5769b4f5..35ddce08 100644 --- a/phreeqcpp/tidy.cpp +++ b/phreeqcpp/tidy.cpp @@ -5431,6 +5431,16 @@ tidy_isotope_ratios(void) /* * Mark master species list as minor isotope */ + if (isotope_ratio[i]->isotope_name == NULL) + { + + input_error++; + error_string = sformatf( + "For ISOTOPE_RATIO, did not find ISOTOPE name for this isotope ratio %s", + isotope_ratio[i]->name); + error_msg(error_string, CONTINUE); + continue; + } master_isotope_ptr = master_isotope_search(isotope_ratio[i]->isotope_name); if (master_isotope_ptr == NULL) diff --git a/phreeqcpp/utilities.cpp b/phreeqcpp/utilities.cpp index 79dfae7f..b2ff4839 100644 --- a/phreeqcpp/utilities.cpp +++ b/phreeqcpp/utilities.cpp @@ -41,6 +41,10 @@ calc_alk(CReaction& rxn_ref) break; } return_value += r_token->coef * master_ptr->alk; + //if (strcmp(r_token->name, "e-") == 0 && strcmp(rxn_ref.token[0].name,"e-") != 0) + //{ + // std::cerr << rxn_ref.token[0].name << " Non-master species has e- in reaction.\n"; + //} r_token++; } return (return_value);