diff options
author | Zack Middleton <zturtleman@gmail.com> | 2011-10-28 19:43:43 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-12 20:13:56 +0000 |
commit | 333c10313724eb3e9ec21f2d2a676e9c88fbf638 (patch) | |
tree | b6545f8f27921f29b6fa7ef73136b78831b6cd18 /src | |
parent | 4493b0f5cebc101032a567fe8dca9b74632955ca (diff) |
Fixed showing number of qvm jump table targets (r2180 caused it to show 0 on alloc).
Diffstat (limited to 'src')
-rw-r--r-- | src/qcommon/vm.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/qcommon/vm.c b/src/qcommon/vm.c index a3883209..b7860896 100644 --- a/src/qcommon/vm.c +++ b/src/qcommon/vm.c @@ -482,18 +482,20 @@ vmHeader_t *VM_LoadQVM( vm_t *vm, qboolean alloc, qboolean unpure) if(header.h->vmMagic == VM_MAGIC_VER2) { - Com_Printf("Loading %d jump table targets\n", vm->numJumpTableTargets); + int previousNumJumpTableTargets = vm->numJumpTableTargets; header.h->jtrgLength &= ~0x03; + vm->numJumpTableTargets = header.h->jtrgLength >> 2; + Com_Printf("Loading %d jump table targets\n", vm->numJumpTableTargets); + if(alloc) { vm->jumpTableTargets = Hunk_Alloc(header.h->jtrgLength, h_high); - vm->numJumpTableTargets = header.h->jtrgLength >> 2; } else { - if((header.h->jtrgLength >> 2) != vm->numJumpTableTargets) + if(vm->numJumpTableTargets != previousNumJumpTableTargets) { VM_Free(vm); FS_FreeFile(header.v); |