diff --git a/state_machine.lua b/state_machine.lua index fcebed1..bd04ed1 100644 --- a/state_machine.lua +++ b/state_machine.lua @@ -65,7 +65,7 @@ end function state_machine:_call_and_transition(name, ...) local r = self:_call(name, ...) if type(r) == "string" and self:has_state(r) then - self:set_state(r, r == self.current_state_name) + self:set_state(r, true) return nil end return r