Yet another fix to the ext2spice code handling output formatting

of SI values, this time to put the precision and the value in the
order that is generally more accepted.  The gcc compiler, at
least, doesn't seem to care which order they are given in.
This commit is contained in:
Tim Edwards
2023-11-10 12:52:55 -05:00
parent 1131085d0f
commit 7db77d47f1
+3 -3
View File
@@ -3164,7 +3164,7 @@ esSIvalue(file, value)
char ptest[32];
float pvalue;
sprintf(ptest, "%.*g", value, precision);
sprintf(ptest, "%.*g", precision, value);
sscanf(ptest, "%f", &pvalue);
vtrunc = (int)(0.5 + (value * 1e6));
ptrunc = (int)(0.5 + (pvalue * 1e6));
@@ -3172,9 +3172,9 @@ esSIvalue(file, value)
}
if (suffix == '\0')
fprintf(file, "%.*g", value, precision);
fprintf(file, "%.*g", precision, value);
else
fprintf(file, "%.*%c", value, precision, suffix);
fprintf(file, "%.*g%c", precision, value, suffix);
}
/*