use memcpy to fix use of misaligned data

This commit is contained in:
Ludwig Nussel 2005-11-01 19:59:14 +00:00
parent f4dbf0db95
commit 48683c91a8

View file

@ -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 ) {