# HG changeset patch # User Kim Alvefur # Date 1430779299 -7200 # Node ID 999434eb1bbfca64b61d34619e973c7d80bfc53b # Parent 9795b8cf14f1afd66192b82b2b36ec6d785c2c41 util.events: Add local reference to table.remove (fixes traceback) diff -r 9795b8cf14f1 -r 999434eb1bbf util/events.lua --- a/util/events.lua Sun May 03 18:38:39 2015 +0200 +++ b/util/events.lua Tue May 05 00:41:39 2015 +0200 @@ -9,6 +9,7 @@ local pairs = pairs; local t_insert = table.insert; +local t_remove = table.remove; local t_sort = table.sort; local setmetatable = setmetatable; local next = next; @@ -118,7 +119,7 @@ if not w then return; end for i = #w, 1 do if w[i] == wrapper then - table.remove(w, i); + t_remove(w, i); end end if #w == 0 then