Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fill tolua_Error when enum is invalid #2

Merged
merged 1 commit into from
May 17, 2017
Merged

Fill tolua_Error when enum is invalid #2

merged 1 commit into from
May 17, 2017

Conversation

peterbell10
Copy link
Member

Fixes cuberite issue #3608

The generated functions tolua_is{Enum} don't fill the tolua_Error leading to nonsense outputs and crashes when printing the error.

Error reporting now works as expected:

LUA: Plugins/BlockInfoTest/plugin.lua:12: error in function 'GetPlaceSound'.
     argument #2 is 'number'; 'BLOCKTYPE' expected.

Copy link
Member

@madmaxoft madmaxoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, and nice going overall!

@madmaxoft madmaxoft requested a review from worktycho May 16, 2017 16:02
@Seadragon91 Seadragon91 merged commit 2bfca6b into cuberite:master May 17, 2017
@peterbell10 peterbell10 deleted the InvalidEnumCrashFix branch May 17, 2017 09:08
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.

None yet

4 participants