Fix binary number literal parsing.

Reported by Egor Skriptunoff.
This commit is contained in:
Mike Pall 2020-11-30 15:48:34 +01:00
parent a50262c490
commit 377a8488b6

View File

@ -443,6 +443,7 @@ StrScanFmt lj_strscan_scan(const uint8_t *p, MSize len, TValue *o,
/* Handle decimal point. */
if (dp) {
if (base == 2) return STRSCAN_ERROR;
fmt = STRSCAN_NUM;
if (dig) {
ex = (int32_t)(dp-(p-1)); dp = p-1;