diff options
author | Mike Pall <mike> | 2020-11-30 15:48:34 +0100 |
---|---|---|
committer | Mike Pall <mike> | 2020-11-30 15:48:34 +0100 |
commit | 377a8488b62a9f1b589bb68875dd1288aa70e76e (patch) | |
tree | 008b1cd2dff8403f25a71594cec9cbf0f87c384c | |
parent | a50262c490e7847bd4c08a691b430dfa6a297871 (diff) | |
download | luajit-377a8488b62a9f1b589bb68875dd1288aa70e76e.tar.gz luajit-377a8488b62a9f1b589bb68875dd1288aa70e76e.tar.bz2 luajit-377a8488b62a9f1b589bb68875dd1288aa70e76e.zip |
Fix binary number literal parsing.
Reported by Egor Skriptunoff.
Diffstat (limited to '')
-rw-r--r-- | src/lj_strscan.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lj_strscan.c b/src/lj_strscan.c index 11abd526..3863ff1c 100644 --- a/src/lj_strscan.c +++ b/src/lj_strscan.c | |||
@@ -443,6 +443,7 @@ StrScanFmt lj_strscan_scan(const uint8_t *p, MSize len, TValue *o, | |||
443 | 443 | ||
444 | /* Handle decimal point. */ | 444 | /* Handle decimal point. */ |
445 | if (dp) { | 445 | if (dp) { |
446 | if (base == 2) return STRSCAN_ERROR; | ||
446 | fmt = STRSCAN_NUM; | 447 | fmt = STRSCAN_NUM; |
447 | if (dig) { | 448 | if (dig) { |
448 | ex = (int32_t)(dp-(p-1)); dp = p-1; | 449 | ex = (int32_t)(dp-(p-1)); dp = p-1; |