aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-05-08 18:04:50 +0200
committerKim Alvefur <zash@zash.se>2022-05-08 18:04:50 +0200
commitd05af9f2b54d292b49b694d8317152f4339f7076 (patch)
tree1a88bba24f31ae96d8676884258c17430884b812 /util
parent11638f57e2c86a63c5f0ace88aac52429061b200 (diff)
downloadprosody-d05af9f2b54d292b49b694d8317152f4339f7076.tar.gz
prosody-d05af9f2b54d292b49b694d8317152f4339f7076.zip
util.jsonpointer: Fix off-by-one in array resolution
Fixes #1753 Not known to be used anywhere
Diffstat (limited to 'util')
-rw-r--r--util/jsonpointer.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/jsonpointer.lua b/util/jsonpointer.lua
index 7c657266..dd5ac9d6 100644
--- a/util/jsonpointer.lua
+++ b/util/jsonpointer.lua
@@ -20,7 +20,7 @@ local function resolve_json_pointer(ref, path)
if token == "-" then
i = #ref + 1
end
- new_ref = ref[i]
+ new_ref = ref[i + 1]
else
return nil, "invalid-table"
end