Fix truncated-format warning in ncgen

This commit is contained in:
Peter Hill 2024-03-25 15:49:03 +00:00
parent cffc5187a2
commit 33a6ab034a
No known key found for this signature in database
GPG Key ID: 0C6B9742E72848EE

View File

@ -193,7 +193,7 @@ cstring(
return cp;
case NC_DOUBLE:
cp_size = 20;
cp_size = 24;
cp = (char *) emalloc (cp_size);
doublep = (double *)valp;
(void) snprintf(cp,cp_size,"%.16g",* (doublep + num));