diff options
-rw-r--r-- | test/unit/helpers.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/unit/helpers.lua b/test/unit/helpers.lua index b1e709c444..589e026e5f 100644 --- a/test/unit/helpers.lua +++ b/test/unit/helpers.lua @@ -690,7 +690,9 @@ local function check_child_err(rd) break end trace[#trace + 1] = traceline - table.remove(trace, maxtrace + 1) + if #trace > maxtrace then + table.remove(trace, 1) + end end local res = sc.read(rd, 2) if #res ~= 2 then |