Skip to content

Conversation

OttoHatt
Copy link
Contributor

Performance improvements.
And, fixes a bug where pushing an invalid value into the StateStack fatally corrupts it (read comment).

local stack = StateStack.new("a", "string")
local clean = stack:PushState("b")
task.defer(stack.PushState, stack, 1)
task.defer(function()
	-- '1' was added to the internal stack.
	-- Cleaning pulls it back up, setting .Value =, throwing inline!
	clean()
	print("New value", stack:GetState())
end)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant