From b1ba08510c208685fda8a0a2d0e2b72d98db23b1 Mon Sep 17 00:00:00 2001 From: notaz Date: Tue, 9 Dec 2014 23:36:05 +0200 Subject: [PATCH] psxinterpreter: don't break strict aliasing rules --- libpcsxcore/psxinterpreter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libpcsxcore/psxinterpreter.c b/libpcsxcore/psxinterpreter.c index ff494913..cf3de798 100644 --- a/libpcsxcore/psxinterpreter.c +++ b/libpcsxcore/psxinterpreter.c @@ -727,9 +727,9 @@ void psxLWR() { */ } -void psxSB() { psxMemWrite8 (_oB_, _u8 (_rRt_)); } -void psxSH() { psxMemWrite16(_oB_, _u16(_rRt_)); } -void psxSW() { psxMemWrite32(_oB_, _u32(_rRt_)); } +void psxSB() { psxMemWrite8 (_oB_, _rRt_ & 0xff); } +void psxSH() { psxMemWrite16(_oB_, _rRt_ & 0xffff); } +void psxSW() { psxMemWrite32(_oB_, _rRt_); } u32 SWL_MASK[4] = { 0xffffff00, 0xffff0000, 0xff000000, 0 }; u32 SWL_SHIFT[4] = { 24, 16, 8, 0 }; -- 2.39.5