Fix $display with %d following %g.

This commit is contained in:
Wilson Snyder
2011-11-20 00:45:59 -05:00
parent 8cf12416c0
commit 5df3bbe188
5 changed files with 14 additions and 0 deletions
+2
View File
@@ -333,7 +333,9 @@ void _vl_vsformat(string& output, const char* formatp, va_list ap) {
case 'e':
case 'f':
case 'g': {
const int lbits = va_arg(ap, int);
double d = va_arg(ap, double);
if (lbits) {} // UNUSED - always 64
strncpy(tmpf, pctp, pos-pctp+1);
tmpf[pos-pctp+1] = '\0';
sprintf(tmp, tmpf, d);