1
0
forked from aniani/vim

patch 8.1.1355: obvious mistakes are accepted as valid expressions

Problem:    Obvious mistakes are accepted as valid expressions.
Solution:   Be more strict about parsing numbers. (Yasuhiro Matsumoto,
            closes #3981)
This commit is contained in:
Bram Moolenaar
2019-05-19 19:59:35 +02:00
parent f5842c5a53
commit 16e9b85113
13 changed files with 86 additions and 28 deletions

View File

@@ -5794,7 +5794,7 @@ do_addsub(
0 + (dobin ? STR2NR_BIN : 0)
+ (dooct ? STR2NR_OCT : 0)
+ (dohex ? STR2NR_HEX : 0),
NULL, &n, maxlen);
NULL, &n, maxlen, FALSE);
/* ignore leading '-' for hex and octal and bin numbers */
if (pre && negative)