Skip to content

missing break; causes assertion #23

@AdamMil

Description

@AdamMil

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).

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