Changeset

8758:c380a22d52d5

util.events: Fix loop construct (negative step required)
author Matthew Wild <mwild1@gmail.com>
date Tue, 24 Apr 2018 22:58:46 +0100
parents 8757:861a7d6c12d8
children 8759:9e839fb4541a 8789:4ae8dd415e94
files util/events.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/util/events.lua	Tue Apr 17 18:40:57 2018 +0200
+++ b/util/events.lua	Tue Apr 24 22:58:46 2018 +0100
@@ -125,7 +125,7 @@
 			w = wrappers[event_name];
 		end
 		if not w then return; end
-		for i = #w, 1 do
+		for i = #w, 1, -1 do
 			if w[i] == wrapper then
 				t_remove(w, i);
 			end