use vm->callLevel to count recursive calls to VM_Call
Throw an error if vm->callLevel is set and VM_Free is called.
This commit is contained in:
parent
6c5211c0d3
commit
7a5243a3b2
4 changed files with 18 additions and 16 deletions
|
@ -1069,7 +1069,6 @@ int VM_CallCompiled( vm_t *vm, int *args ) {
|
|||
|
||||
currentVM = vm;
|
||||
|
||||
++vm->callLevel;
|
||||
// Com_Printf("entering %s level %d, call %d, arg1 = 0x%x\n", vm->name, vm->callLevel, args[0], args[1]);
|
||||
|
||||
// interpret the code
|
||||
|
@ -1131,7 +1130,6 @@ int VM_CallCompiled( vm_t *vm, int *args ) {
|
|||
}
|
||||
|
||||
// Com_Printf("exiting %s level %d\n", vm->name, vm->callLevel);
|
||||
--vm->callLevel;
|
||||
vm->programStack = stackOnEntry;
|
||||
|
||||
return *(int *)opStack;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue