diff --git a/src/lua/msgpackffi.lua b/src/lua/msgpackffi.lua
index eff23ddc9098580e527a7f6a999b4976f6106e3b..db264974e36409c999a8bd737a2dba420ada3097 100644
--- a/src/lua/msgpackffi.lua
+++ b/src/lua/msgpackffi.lua
@@ -358,10 +358,10 @@ end
 
 local function decode_array(data, size)
     assert (type(size) == "number")
-    local arr = { [size] = 0}
+    local arr = {}
     local i
     for i=1,size,1 do
-        arr[i] = decode_r(data)
+        table.insert(arr, decode_r(data))
     end
     return arr
 end
diff --git a/test/box/tuple.result b/test/box/tuple.result
index 50713b7c5e8e996a81bea04002a1e8c3d6b9dee0..097b52e9cd7d750202d4354f67a9332c42ac8fdd 100644
--- a/test/box/tuple.result
+++ b/test/box/tuple.result
@@ -377,11 +377,11 @@ t:next(3)
 ...
 t:next(4)
 ---
-- error: '[string "-- tuple.lua (internal file)..."]:64: error: invalid key to ''next'''
+- error: '[string "-- tuple.lua (internal file)..."]:63: error: invalid key to ''next'''
 ...
 t:next(-1)
 ---
-- error: '[string "-- tuple.lua (internal file)..."]:64: error: invalid key to ''next'''
+- error: '[string "-- tuple.lua (internal file)..."]:63: error: invalid key to ''next'''
 ...
 t:next("fdsaf")
 ---
@@ -397,7 +397,7 @@ t=space:insert{1953719668}
 ...
 t:next(1684234849)
 ---
-- error: '[string "-- tuple.lua (internal file)..."]:64: error: invalid key to ''next'''
+- error: '[string "-- tuple.lua (internal file)..."]:63: error: invalid key to ''next'''
 ...
 t:next(1)
 ---
@@ -552,7 +552,7 @@ r = {}
 ...
 for _state, val in t:pairs(10) do table.insert(r, val) end
 ---
-- error: '[string "-- tuple.lua (internal file)..."]:64: error: invalid key to ''next'''
+- error: '[string "-- tuple.lua (internal file)..."]:63: error: invalid key to ''next'''
 ...
 r
 ---