Skip to content

hump.signal - crashes when sending "clear", "remove" or any other signals that share a name with a Registry function name. #118

Description

@sysl-dev

signal.emit("clear")

Error: library/hump/signal.lua:42: bad argument #1 to 'pairs' (table expected, got function)

function Registry:emit(s, ...)
	for f in pairs(self[s]) do
		f(...)
	end
end

Registry:emit does not check if self[s] is a function before trying to read it like a table.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions