From 7ca6b29f35d522d78c583979a595a6b5bb80cca9 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 28 Apr 2007 10:40:00 +0000 Subject: Double-invert the logic on some big/little endian checks (the idea is that we want to fallback to safe code unless we definitely know no endian/alignment issues are in the way; this way it will work even if the endianess is unknown) svn-id: r26649 --- common/endian.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/endian.h b/common/endian.h index 173605dde4..c2e9267b58 100644 --- a/common/endian.h +++ b/common/endian.h @@ -131,7 +131,7 @@ FORCEINLINE uint16 SWAP_BYTES_16(uint16 a) { #endif -#if defined(SCUMM_NEED_ALIGNMENT) || defined(SCUMM_BIG_ENDIAN) +#if defined(SCUMM_NEED_ALIGNMENT) || !defined(SCUMM_LITTLE_ENDIAN) FORCEINLINE uint16 READ_LE_UINT16(const void *ptr) { const byte *b = (const byte *)ptr; return (b[1] << 8) + b[0]; @@ -168,7 +168,7 @@ FORCEINLINE uint16 SWAP_BYTES_16(uint16 a) { #endif -#if defined(SCUMM_NEED_ALIGNMENT) || defined(SCUMM_LITTLE_ENDIAN) +#if defined(SCUMM_NEED_ALIGNMENT) || !defined(SCUMM_BIG_ENDIAN) FORCEINLINE uint16 READ_BE_UINT16(const void *ptr) { const byte *b = (const byte *)ptr; return (b[0] << 8) + b[1]; -- cgit v1.2.3