summaryrefslogtreecommitdiffstats
path: root/src/json.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2023-03-04 20:47:39 +0000
committerBram Moolenaar <Bram@vim.org>2023-03-04 20:47:39 +0000
commit5fb78c3fa5c996c08a65431d698bd2c251eef5c7 (patch)
tree859712525dc94a60f02b27c38d23fdf7f3e96590 /src/json.c
parent5284b23e148063648be0ff46c730ca574e3ca9fa (diff)
patch 9.0.1380: CTRL-X on 2**64 subtracts twov9.0.1380
Problem: CTRL-X on 2**64 subtracts two. (James McCoy) Solution: Correct computation for large number. (closes #12103)
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/json.c b/src/json.c
index 9c084b4605..c1602c3d83 100644
--- a/src/json.c
+++ b/src/json.c
@@ -540,7 +540,7 @@ json_decode_string(js_read_T *reader, typval_T *res, int quote)
nr = 0;
len = 0;
vim_str2nr(p + 2, NULL, &len,
- STR2NR_HEX + STR2NR_FORCE, &nr, NULL, 4, TRUE);
+ STR2NR_HEX + STR2NR_FORCE, &nr, NULL, 4, TRUE, NULL);
if (len == 0)
{
if (res != NULL)
@@ -556,8 +556,8 @@ json_decode_string(js_read_T *reader, typval_T *res, int quote)
// decode surrogate pair: \ud812\u3456
len = 0;
- vim_str2nr(p + 2, NULL, &len,
- STR2NR_HEX + STR2NR_FORCE, &nr2, NULL, 4, TRUE);
+ vim_str2nr(p + 2, NULL, &len, STR2NR_HEX + STR2NR_FORCE,
+ &nr2, NULL, 4, TRUE, NULL);
if (len == 0)
{
if (res != NULL)
@@ -882,7 +882,7 @@ json_decode_item(js_read_T *reader, typval_T *res, int options)
vim_str2nr(reader->js_buf + reader->js_used,
NULL, &len, 0, // what
- &nr, NULL, 0, TRUE);
+ &nr, NULL, 0, TRUE, NULL);
if (len == 0)
{
semsg(_(e_json_decode_error_at_str), p);