mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Fix string to number conversion.
Thanks to Lesley De Cruz.
This commit is contained in:
parent
4fa51affe8
commit
e6b0875a7e
@ -199,7 +199,7 @@ static StrScanFmt strscan_dec(const uint8_t *p, TValue *o,
|
||||
*xip++ = d + ((*p != '.' ? *p : *++p) & 15); p++;
|
||||
}
|
||||
/* Scan and realign trailing digit. */
|
||||
if (i) *xip++ = 10 * ((*p != '.' ? *p : *++p) & 15), ex10--, p++;
|
||||
if (i) *xip++ = 10 * ((*p != '.' ? *p : *++p) & 15), ex10--, dig++, p++;
|
||||
|
||||
/* Summarize rounding-effect of excess digits. */
|
||||
if (dig > STRSCAN_MAXDIG) {
|
||||
|
Loading…
Reference in New Issue
Block a user