Diff

util/jsonpointer.lua @ 12496:87c3d45208ef 0.12

util.jsonpointer: Fix off-by-one in array resolution Fixes #1753 Not known to be used anywhere
author Kim Alvefur <zash@zash.se>
date Sun, 08 May 2022 18:04:50 +0200
parent 12131:b4c0efff8dd3
child 12499:03e307952816
line wrap: on
line diff
--- a/util/jsonpointer.lua	Sun May 08 18:03:44 2022 +0200
+++ b/util/jsonpointer.lua	Sun May 08 18:04:50 2022 +0200
@@ -20,7 +20,7 @@
 			if token == "-" then
 				i = #ref + 1
 			end
-			new_ref = ref[i]
+			new_ref = ref[i + 1]
 		else
 			return nil, "invalid-table"
 		end