diff options
author | ludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-11-06 13:46:17 +0000 |
---|---|---|
committer | ludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea> | 2005-11-06 13:46:17 +0000 |
commit | 44f5da6e42784fcf7a61f6c17f3302723f4ab52a (patch) | |
tree | 143658bfde2f96503868796deb8fb58824adbbff | |
parent | ede5566fabac2b5e9a8d407e02143714d5e2cf07 (diff) | |
download | ioquake3-aero-44f5da6e42784fcf7a61f6c17f3302723f4ab52a.tar.gz ioquake3-aero-44f5da6e42784fcf7a61f6c17f3302723f4ab52a.zip |
- fall back to interpreter if VM_Compile resets vm->compiled
git-svn-id: svn://svn.icculus.org/quake3/trunk@294 edf5b092-35ff-0310-97b2-ce42778d08ea
-rw-r--r-- | code/qcommon/vm.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/code/qcommon/vm.c b/code/qcommon/vm.c index 8f3e7a3..d241af8 100644 --- a/code/qcommon/vm.c +++ b/code/qcommon/vm.c @@ -574,6 +574,8 @@ vm_t *VM_Create( const char *module, long (*systemCalls)(long *), // copy or compile the instructions vm->codeLength = header->codeLength; + vm->compiled = qfalse; + #ifdef NO_VM_COMPILED if(interpret >= VMI_COMPILED) { 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 ) { vm->compiled = qtrue; VM_Compile( vm, header ); - } else + } #endif + // VM_Compile may have reset vm->compiled if compilation failed + if (!vm->compiled) { - vm->compiled = qfalse; VM_PrepareInterpreter( vm, header ); } |