From: Jarkko Hietaniemi Date: Sun, 1 Aug 1999 11:41:52 +0000 (+0000) Subject: Reading 64-bit decimal numbers was broken because X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b8403495fe114eb6eca7191acf244241d9f0d38f;p=p5sagit%2Fp5-mst-13.2.git Reading 64-bit decimal numbers was broken because the NV was cast to an I32, not an IV. p4raw-id: //depot/cfgperl@3846 --- diff --git a/toke.c b/toke.c index 55aba05..c4521c5 100644 --- a/toke.c +++ b/toke.c @@ -6257,10 +6257,10 @@ Perl_scan_num(pTHX_ char *start) register char *s = start; /* current position in buffer */ register char *d; /* destination in temp buffer */ register char *e; /* end of temp buffer */ - I32 tryiv; /* used to see if it can be an int */ + IV tryiv; /* used to see if it can be an IV */ NV value; /* number read, as a double */ SV *sv; /* place to put the converted number */ - I32 floatit; /* boolean: int or float? */ + bool floatit; /* boolean: int or float? */ char *lastub = 0; /* position of last underbar */ static char number_too_long[] = "Number too long"; @@ -6532,9 +6532,11 @@ Perl_scan_num(pTHX_ char *start) sv_setiv(sv, tryiv); else sv_setnv(sv, value); - if ( floatit ? (PL_hints & HINT_NEW_FLOAT) : (PL_hints & HINT_NEW_INTEGER) ) + if ( floatit ? (PL_hints & HINT_NEW_FLOAT) : + (PL_hints & HINT_NEW_INTEGER) ) sv = new_constant(PL_tokenbuf, d - PL_tokenbuf, - (floatit ? "float" : "integer"), sv, Nullsv, NULL); + (floatit ? "float" : "integer"), + sv, Nullsv, NULL); break; }