Mercurial > vim
diff src/ex_cmds.c @ 16706:77bcb5055fec v8.1.1355
patch 8.1.1355: obvious mistakes are accepted as valid expressions
commit https://github.com/vim/vim/commit/16e9b85113e0b354ece1cb4f5fcc7866850f3685
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun May 19 19:59:35 2019 +0200
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)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 19 May 2019 20:00:09 +0200 |
parents | 23af483c4ceb |
children | ba592f30c082 |
line wrap: on
line diff
--- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -558,7 +558,8 @@ ex_sort(exarg_T *eap) { nrs[lnum - eap->line1].st_u.num.is_number = TRUE; vim_str2nr(s, NULL, NULL, sort_what, - &nrs[lnum - eap->line1].st_u.num.value, NULL, 0); + &nrs[lnum - eap->line1].st_u.num.value, + NULL, 0, FALSE); } } #ifdef FEAT_FLOAT