Restore setnumV for fmt == STRSCAN_NUM in lj_strscan_scan

This commit is contained in:
indev authored and Alug committed 2025-03-02 22:06:55 +01:00
1 parent 6d604aed28
commit 7480105a06
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