mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 23:02:01 +00:00
use memcpy to fix use of misaligned data
This commit is contained in:
parent
f4dbf0db95
commit
48683c91a8
1 changed files with 5 additions and 1 deletions
|
@ -124,7 +124,11 @@ static char *opnames[256] = {
|
|||
#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 ) {
|
||||
|
|
Loading…
Reference in a new issue