From fb59ec8b19173e55422aef14fd2488cd1aca0680 Mon Sep 17 00:00:00 2001 From: Darth Vader Date: Tue, 17 Jan 2023 03:32:29 +0000 Subject: [PATCH] Squashed 'phreeqcpp/' changes from feaa432..bbd2543 bbd2543 [phreeqc] fixes what iphreeqc/issue-8 broke git-subtree-dir: phreeqcpp git-subtree-split: bbd2543978c857c8e46ff6f553231f188c5cb32c --- PBasic.cpp | 4 ++-- basicsubs.cpp | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/PBasic.cpp b/PBasic.cpp index 7233f91c..99b4661d 100644 --- a/PBasic.cpp +++ b/PBasic.cpp @@ -3610,7 +3610,7 @@ factor(struct LOC_exec * LINK) std::string std_num; { - snprintf(token, sizeof(token), "%*.*e", length, width, nmbr); + snprintf(token, max_length, "%*.*e", length, width, nmbr); std_num = token; } @@ -3653,7 +3653,7 @@ factor(struct LOC_exec * LINK) std::string std_num; { - snprintf(token, sizeof(token), "%*.*f", length, width, nmbr); + snprintf(token, max_length, "%*.*f", length, width, nmbr); std_num = token; } diff --git a/basicsubs.cpp b/basicsubs.cpp index 3e93470b..69eed0ed 100644 --- a/basicsubs.cpp +++ b/basicsubs.cpp @@ -2097,7 +2097,6 @@ match_elts_in_species(const char *name, const char *mytemplate) * write out string */ token[0] = '\0'; - assert(MAX_LENGTH == sizeof(token1)); for (i = 0; i < count_match_tokens; i++) { strcat(token, match_vector[i].first.c_str());