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

missing break; causes assertion #23

Open
AdamMil opened this issue Jan 28, 2019 · 0 comments
Open

missing break; causes assertion #23

AdamMil opened this issue Jan 28, 2019 · 0 comments

Comments

@AdamMil
Copy link

@AdamMil AdamMil commented Jan 28, 2019

The OP_NEWOBJ opcode is missing a break statement in the switch:

case NOT_CLASS:
{
	ExpressionPtr attributes;
	ExpressionPtr baseClass;

	if (arg1 != -1)
		baseClass = state.GetVar(arg1);

	if (arg2 != 0xff)
		attributes = state.GetVar(arg2);

	state.SetVar(arg0, ExpressionPtr(new NewClassExpression(baseClass, attributes)));
    // MISSING BREAK HERE!
}
default:
	assert(0);
	break;

This causes a crash when it falls into the assert(0).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant