Skip to content

Commit d10400a

Browse files
authored
Merge pull request craigmj#21 from changangela/patch-1
Fixed ipairs issue with array indices
2 parents 3f9db31 + 0b5f755 commit d10400a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

json/json.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function decode_scanArray(s,startPos)
170170
assert(string.sub(s,startPos,startPos)=='[','decode_scanArray called but array does not start at position ' .. startPos .. ' in string:\n'..s )
171171
startPos = startPos + 1
172172
-- Infinite loop for array elements
173-
local index = 0
173+
local index = 1
174174
repeat
175175
startPos = decode_scanWhitespace(s,startPos)
176176
assert(startPos<=stringLen,'JSON String ended unexpectedly scanning array.')

0 commit comments

Comments
 (0)