mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-23 12:32:09 +00:00
- fall back to interpreter if VM_Compile resets vm->compiled
This commit is contained in:
parent
87b12105bc
commit
8a18ecb961
1 changed files with 5 additions and 2 deletions
|
@ -574,6 +574,8 @@ vm_t *VM_Create( const char *module, long (*systemCalls)(long *),
|
||||||
// copy or compile the instructions
|
// copy or compile the instructions
|
||||||
vm->codeLength = header->codeLength;
|
vm->codeLength = header->codeLength;
|
||||||
|
|
||||||
|
vm->compiled = qfalse;
|
||||||
|
|
||||||
#ifdef NO_VM_COMPILED
|
#ifdef NO_VM_COMPILED
|
||||||
if(interpret >= VMI_COMPILED) {
|
if(interpret >= VMI_COMPILED) {
|
||||||
Com_Printf("Architecture doesn't have a bytecode compiler, using interpreter\n");
|
Com_Printf("Architecture doesn't have a bytecode compiler, using interpreter\n");
|
||||||
|
@ -583,10 +585,11 @@ vm_t *VM_Create( const char *module, long (*systemCalls)(long *),
|
||||||
if ( interpret >= VMI_COMPILED ) {
|
if ( interpret >= VMI_COMPILED ) {
|
||||||
vm->compiled = qtrue;
|
vm->compiled = qtrue;
|
||||||
VM_Compile( vm, header );
|
VM_Compile( vm, header );
|
||||||
} else
|
}
|
||||||
#endif
|
#endif
|
||||||
|
// VM_Compile may have reset vm->compiled if compilation failed
|
||||||
|
if (!vm->compiled)
|
||||||
{
|
{
|
||||||
vm->compiled = qfalse;
|
|
||||||
VM_PrepareInterpreter( vm, header );
|
VM_PrepareInterpreter( vm, header );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue