r208 - trunk/code/qcommon
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Tue Nov 1 14:59:15 EST 2005
Author: ludwig
Date: 2005-11-01 14:59:14 -0500 (Tue, 01 Nov 2005)
New Revision: 208
Modified:
trunk/code/qcommon/vm_interpreted.c
Log:
use memcpy to fix use of misaligned data
Modified: trunk/code/qcommon/vm_interpreted.c
===================================================================
--- trunk/code/qcommon/vm_interpreted.c 2005-11-01 19:47:47 UTC (rev 207)
+++ trunk/code/qcommon/vm_interpreted.c 2005-11-01 19:59:14 UTC (rev 208)
@@ -124,7 +124,11 @@
#define loadWord(addr) __lwbrx(addr,0)
#endif
#else
- #define loadWord(addr) LittleLong(*((int *)addr))
+ static inline int loadWord(void *addr) {
+ int word;
+ memcpy(&word, addr, 4);
+ return LittleLong(word);
+ }
#endif
char *VM_Indent( vm_t *vm ) {
More information about the quake3-commits
mailing list