From 7cfb72ee4deead7a800fb9c82719bf0c2b86aa9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Lu=C3=ADs=20Vaz=20Silva?= Date: Sun, 18 Dec 2022 15:43:54 -0300 Subject: [PATCH 09/51] Error out instead of crashing for vector out variables --- src/common/scripting/vm/vmexec.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/scripting/vm/vmexec.h b/src/common/scripting/vm/vmexec.h index 671bfc081..6716509da 100644 --- a/src/common/scripting/vm/vmexec.h +++ b/src/common/scripting/vm/vmexec.h @@ -824,6 +824,10 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret) assert(b < f->NumRegF); ::new(param) VMValue(®.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]); -- 2.39.3