aboutsummaryrefslogtreecommitdiffstats
path: root/teal-src/util/jsonpointer.tl
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-05-08 18:06:41 +0200
committerKim Alvefur <zash@zash.se>2022-05-08 18:06:41 +0200
commit1c6747f200505db7900204a9297b97c82c959df1 (patch)
treeb73fc162210693217cefb6c7521224988679f351 /teal-src/util/jsonpointer.tl
parent71dc755f0f20c5dd2ad6ed76a8ae791bae16a8b1 (diff)
parentd05af9f2b54d292b49b694d8317152f4339f7076 (diff)
downloadprosody-1c6747f200505db7900204a9297b97c82c959df1.tar.gz
prosody-1c6747f200505db7900204a9297b97c82c959df1.zip
Merge 0.12->trunk
Diffstat (limited to 'teal-src/util/jsonpointer.tl')
-rw-r--r--teal-src/util/jsonpointer.tl2
1 files changed, 1 insertions, 1 deletions
diff --git a/teal-src/util/jsonpointer.tl b/teal-src/util/jsonpointer.tl
index 7b9db760..c21e1fbf 100644
--- a/teal-src/util/jsonpointer.tl
+++ b/teal-src/util/jsonpointer.tl
@@ -24,7 +24,7 @@ local function resolve_json_pointer(ref : table, path : string) : any, ptr_error
elseif idx is integer then
local i = tonumber(token)
if token == "-" then i = #ref + 1 end
- new_ref = ref[i]
+ new_ref = ref[i+1]
else
return nil, "invalid-table"
end