Skip to content

Conversation

@HertzDevil
Copy link
Contributor

Lua's error function is allowed to raise any object as an error, not just strings; when this happens, lua_tostring returns a null pointer in case of incompatible arguments, and Mesen crashes immediately because std::string cannot take a null pointer. Using luaL_tolstring instead will call the Lua tostring, ensuring there is always a valid string message.

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