Skip to content

Commit 972406b

Browse files
committed
tests/lapi: fix debug_torture_test
Since commit 8e35f0c ("cmake: bump luzer version") `fdp:oneof()` in luzer API returns two values: a table's item and it's index. This breaks test `debug_torture_test.lua` with a message below > bad argument #2 to 'insert' (number expected, got string) because `fdp:one()` passed to `table.insert()` makes a call with three arguments: table, hook mask ("string") and index ("number"), while `table.insert()` with three arguments expects table, `pos` ("number"), and a value (any type). Follows up #144
1 parent 3ee6fcd commit 972406b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/lapi/debug_torture_test.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,8 @@ local function TestOneInput(buf)
171171
local n_hook_mask = fdp:consume_integer(0, #hook_mask)
172172
local mask = {}
173173
for _ = 0, n_hook_mask do
174-
table.insert(mask, fdp:oneof(hook_mask))
174+
local m = fdp:oneof(hook_mask)
175+
table.insert(mask, m)
175176
end
176177

177178
-- Turn on the hook.

0 commit comments

Comments
 (0)