Squashed 'examples/c/' changes from 2a2707ae..11a83991

11a83991 [iphreeqc] Issue 8 -- change sprintf to snprintf for CRAN (#9)

git-subtree-dir: examples/c
git-subtree-split: 11a83991492940a25d12e4ffe94623f2b6b05853
This commit is contained in:
Darth Vader 2023-01-15 06:02:06 +00:00
parent f7383cafbb
commit c9fa1d4350

View File

@ -23,7 +23,7 @@ void ExtractWrite(int cell)
switch (vt[j]) {
case TT_DOUBLE:
dv[j] = v.dVal;
sprintf(sv[j], "%23.15e", v.dVal);
snprintf(sv[j], sizeof(sv[j]), "%23.15e", v.dVal);
break;
case TT_STRING:
strcpy(sv[j], v.sVal);