Squashed 'phreeqcpp/' changes from feaa432..bbd2543

bbd2543 [phreeqc] fixes what iphreeqc/issue-8 broke

git-subtree-dir: phreeqcpp
git-subtree-split: bbd2543978c857c8e46ff6f553231f188c5cb32c
This commit is contained in:
Darth Vader 2023-01-17 03:32:29 +00:00
parent be9e230efb
commit fb59ec8b19
2 changed files with 2 additions and 3 deletions

View File

@ -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;
}

View File

@ -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());