diff --git a/code/qcommon/vm_x86.c b/code/qcommon/vm_x86.c index 8053b184..aa63d048 100644 --- a/code/qcommon/vm_x86.c +++ b/code/qcommon/vm_x86.c @@ -1714,7 +1714,7 @@ This function is called directly by the generated code int VM_CallCompiled(vm_t *vm, int *args) { - byte stack[OPSTACK_SIZE * 4 + 15]; + byte stack[OPSTACK_SIZE + 15]; void *entryPoint; int programCounter; int programStack, stackOnEntry; diff --git a/code/qcommon/vm_x86_64.c b/code/qcommon/vm_x86_64.c index 9659265e..27d946f8 100644 --- a/code/qcommon/vm_x86_64.c +++ b/code/qcommon/vm_x86_64.c @@ -1016,7 +1016,7 @@ static char* memData; int VM_CallCompiled(vm_t *vm, int *args) { - int stack[OPSTACK_SIZE + 3]; + int stack[OPSTACK_SIZE + 15]; int programCounter; int programStack; int stackOnEntry; @@ -1063,7 +1063,7 @@ int VM_CallCompiled(vm_t *vm, int *args) // off we go into generated code... entryPoint = getentrypoint(vm); - opStack = PADP(stack, 4); + opStack = PADP(stack, 16); *opStack = 0xDEADBEEF; opStackRet = 0;