Skip to content

Commit

Permalink
Error out instead of crashing for vector out variables
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 authored and coelckers committed Dec 18, 2022
1 parent 941c085 commit fb33a29
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/common/scripting/vm/vmexec.h
Expand Up @@ -824,6 +824,10 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret)
assert(b < f->NumRegF);
::new(param) VMValue(&reg.f[b]);
break;
case REGT_FLOAT | REGT_MULTIREG2 | REGT_ADDROF:
case REGT_FLOAT | REGT_MULTIREG3 | REGT_ADDROF:
case REGT_FLOAT | REGT_MULTIREG4 | REGT_ADDROF:
I_Error("REGT_ADDROF not implemented for vectors\n");
case REGT_FLOAT | REGT_KONST:
assert(b < sfunc->NumKonstF);
::new(param) VMValue(konstf[b]);
Expand Down

0 comments on commit fb33a29

Please sign in to comment.