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

This commit is contained in:
Charlton, Scott R 2023-01-14 22:14:20 -07:00 committed by GitHub
parent 2a2707ae76
commit 11a8399149

View File

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