From af8f19a48ee940864f3454bdb5451a48a35fd089 Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Fri, 22 Aug 2014 13:57:02 +0200 Subject: [PATCH] Forward arguments from GS.pop() to state:resume() --- gamestate.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gamestate.lua b/gamestate.lua index f424fad..a73d319 100644 --- a/gamestate.lua +++ b/gamestate.lua @@ -53,12 +53,12 @@ function GS.push(to, ...) return (to.enter or __NULL__)(to, pre, ...) end -function GS.pop() +function GS.pop(...) assert(#stack > 1, "No more states to pop!") local pre = stack[#stack] stack[#stack] = nil ;(pre.leave or __NULL__)(pre) - return (stack[#stack].resume or __NULL__)(pre) + return (stack[#stack].resume or __NULL__)(pre, ...) end function GS.current()