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 vim/vim#3981)
16e9b85113

Update vim_str2nr_spec.lua to add more tests that use strict = true.
This commit is contained in:
Sean Dewar
2021-05-30 22:50:09 +01:00
parent cd18fe17a8
commit 34cb087955
13 changed files with 136 additions and 59 deletions

View File

@@ -5017,7 +5017,7 @@ int do_addsub(int op_type, pos_T *pos, int length, linenr_T Prenum1)
0 + (do_bin ? STR2NR_BIN : 0)
+ (do_oct ? STR2NR_OCT : 0)
+ (do_hex ? STR2NR_HEX : 0),
NULL, &n, maxlen);
NULL, &n, maxlen, false);
// ignore leading '-' for hex, octal and bin numbers
if (pre && negative) {