r294 - trunk/code/qcommon

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Nov 6 08:46:17 EST 2005


Author: ludwig
Date: 2005-11-06 08:46:17 -0500 (Sun, 06 Nov 2005)
New Revision: 294

Modified:
   trunk/code/qcommon/vm.c
Log:
- fall back to interpreter if VM_Compile resets vm->compiled


Modified: trunk/code/qcommon/vm.c
===================================================================
--- trunk/code/qcommon/vm.c	2005-11-06 13:45:20 UTC (rev 293)
+++ trunk/code/qcommon/vm.c	2005-11-06 13:46:17 UTC (rev 294)
@@ -574,6 +574,8 @@
 	// 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 @@
 	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 );
 	}
 




More information about the quake3-commits mailing list