Restore setnumV for fmt == STRSCAN_NUM in lj_strscan_scan

This commit is contained in:
indev committed 2025-03-03 00:01:06 +03:00
1 parent 91601c8a2d
commit 644cd36286
1 file changed
+4 -1
+4 -1
View File
@@ -575,7 +575,10 @@ StrScanFmt lj_strscan_scan(const uint8_t *p, MSize len, TValue *o,
fmt = strscan_bin(sp, o, fmt, opt, ex, neg, dig);
else
#if LJ_INTONLY
setintV(o, (int32_t)(double)(neg ? (~x+1u) : x));
if (fmt == STRSCAN_NUM)
setnumV(o, (lua_Number)(int32_t)(double)(neg ? ~x+1u : x));
else
setintV(o, (int32_t)(double)(neg ? ~x+1u : x));
#else
fmt = strscan_dec(sp, o, fmt, opt, ex, neg, dig);
#endif