The following maintenance operations were performed: - Recreate all patches with `make makepatch` - Add LICENSE - Update MAINTAINER to kami@freebsd.org - games/ioquake3 - Replace a lot of `.if ${PORT_OPTIONS:MFOO}` with `bsd.options.mk` fu - Add support for slaves using different SDL versions - games/ioquake3-devel - Update to GIT revision 2808 - Use SDL2 - games/iourbanterror - Change treatment of patches so `make makepatch` doesn't screw the patches in ${MASTERDIR}/files over - Update 4.2.018 to 4.2.023 - games/urbanterror-data - Update 4.2.018 to 4.2.023 - Fix install without DOCS Reviewed by: cs Approved by: cs Differential Revision: https://reviews.freebsd.org/D5816
34 lines
1.1 KiB
C
34 lines
1.1 KiB
C
--- code/qcommon/vm_interpreted.c.orig 2008-08-23 22:45:30 UTC
|
|
+++ code/qcommon/vm_interpreted.c
|
|
@@ -526,18 +526,20 @@ nextInstruction2:
|
|
|
|
//VM_LogSyscalls( (int *)&image[ programStack + 4 ] );
|
|
{
|
|
- intptr_t* argptr = (intptr_t *)&image[ programStack + 4 ];
|
|
- #if __WORDSIZE == 64
|
|
- // the vm has ints on the stack, we expect
|
|
- // longs so we have to convert it
|
|
- intptr_t argarr[16];
|
|
- int i;
|
|
- for (i = 0; i < 16; ++i) {
|
|
- argarr[i] = *(int*)&image[ programStack + 4 + 4*i ];
|
|
+ // the vm has ints on the stack, we expect
|
|
+ // pointers so we might have to convert it
|
|
+ if (sizeof(intptr_t) != sizeof(int)) {
|
|
+ intptr_t argarr[16];
|
|
+ int *imagePtr = (int *)&image[programStack];
|
|
+ int i;
|
|
+ for (i = 0; i < 16; ++i) {
|
|
+ argarr[i] = *(++imagePtr);
|
|
+ }
|
|
+ r = vm->systemCall( argarr );
|
|
+ } else {
|
|
+ intptr_t* argptr = (intptr_t *)&image[ programStack + 4 ];
|
|
+ r = vm->systemCall( argptr );
|
|
}
|
|
- argptr = argarr;
|
|
- #endif
|
|
- r = vm->systemCall( argptr );
|
|
}
|
|
|
|
#ifdef DEBUG_VM
|