Fixed issue where the numbers don't appear properly after parsing.

This commit is contained in:
Daniel Lemire 2018-11-30 22:40:10 -05:00
parent 5184f94e2f
commit 4a4bf8d98d
1 changed files with 2 additions and 2 deletions

View File

@ -169,12 +169,12 @@ public:
case 'l': // we have a long int case 'l': // we have a long int
if (tapeidx + 1 >= howmany) if (tapeidx + 1 >= howmany)
return false; return false;
printf("%" PRId64, (int64_t)tape[tapeidx++]); printf("%" PRId64, (int64_t)tape[++tapeidx]);
break; break;
case 'd': // we have a double case 'd': // we have a double
if (tapeidx + 1 >= howmany) if (tapeidx + 1 >= howmany)
return false; return false;
printf("%f", *((double *)&tape[tapeidx++])); printf("%f", *((double *)&tape[++tapeidx]));
break; break;
case 'n': // we have a null case 'n': // we have a null
printf("null"); printf("null");