Put file and line number of the panic:
Bytecode* evt_goto_end_case(Evt* script) {
s32 switchDepth = 1;
Bytecode* pos = script->ptrNextLine;
s32* opcode;
s32* nargs;
do {
opcode = pos++;
nargs = pos++;
pos += *nargs;
switch (*opcode) {
case EVT_OP_END:
PANIC();
break;
case EVT_OP_SWITCH:
switchDepth++;
break;
case EVT_OP_END_SWITCH:
switchDepth--;
if (switchDepth == 0) {
return opcode;
}
break;
}
} while (TRUE);
}
Put file and line number of the panic: