From 11cf27df4d8e6897873729de451cddf84336962c Mon Sep 17 00:00:00 2001 From: Carlo Cabanilla Date: Thu, 11 Apr 2013 23:44:17 -0300 Subject: [PATCH] Fix "self" param to the GS.leave callback --- gamestate.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gamestate.lua b/gamestate.lua index 91fb44e..e019203 100644 --- a/gamestate.lua +++ b/gamestate.lua @@ -36,7 +36,7 @@ function GS.new(t) return t or {} end -- constructor - deprecated! function GS.switch(to, ...) assert(to, "Missing argument: Gamestate to switch to") local pre = current - ;(current.leave or __NULL__)(self) + ;(current.leave or __NULL__)(current) ;(to.init or __NULL__)(to) to.init = nil current = to