diff src/strings.c @ 32098:39f4126d2a0d v9.0.1380

patch 9.0.1380: CTRL-X on 2**64 subtracts two Commit: https://github.com/vim/vim/commit/5fb78c3fa5c996c08a65431d698bd2c251eef5c7 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Mar 4 20:47:39 2023 +0000 patch 9.0.1380: CTRL-X on 2**64 subtracts two Problem: CTRL-X on 2**64 subtracts two. (James McCoy) Solution: Correct computation for large number. (closes https://github.com/vim/vim/issues/12103)
author Bram Moolenaar <Bram@vim.org>
date Sat, 04 Mar 2023 22:00:03 +0100
parents 543153d582d5
children 252b06c87796
line wrap: on
line diff
--- a/src/strings.c
+++ b/src/strings.c
@@ -1188,7 +1188,7 @@ f_str2nr(typval_T *argvars, typval_T *re
 	case 8: what |= STR2NR_OCT + STR2NR_OOCT + STR2NR_FORCE; break;
 	case 16: what |= STR2NR_HEX + STR2NR_FORCE; break;
     }
-    vim_str2nr(p, NULL, NULL, what, &n, NULL, 0, FALSE);
+    vim_str2nr(p, NULL, NULL, what, &n, NULL, 0, FALSE, NULL);
     // Text after the number is silently ignored.
     if (isneg)
 	rettv->vval.v_number = -n;