Skip to content

Commit 377a848

Browse files
author
Mike Pall
committed
Fix binary number literal parsing.
Reported by Egor Skriptunoff.
1 parent a50262c commit 377a848

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/lj_strscan.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ StrScanFmt lj_strscan_scan(const uint8_t *p, MSize len, TValue *o,
443443

444444
/* Handle decimal point. */
445445
if (dp) {
446+
if (base == 2) return STRSCAN_ERROR;
446447
fmt = STRSCAN_NUM;
447448
if (dig) {
448449
ex = (int32_t)(dp-(p-1)); dp = p-1;

0 commit comments

Comments
 (0)