diff options
author | Max Horn | 2007-04-28 10:40:00 +0000 |
---|---|---|
committer | Max Horn | 2007-04-28 10:40:00 +0000 |
commit | 7ca6b29f35d522d78c583979a595a6b5bb80cca9 (patch) | |
tree | 235e7e21ec57d4b53d47afff1277eb075628414c /common | |
parent | 246e83753a1585ca24e9629940df973be611a91b (diff) | |
download | scummvm-rg350-7ca6b29f35d522d78c583979a595a6b5bb80cca9.tar.gz scummvm-rg350-7ca6b29f35d522d78c583979a595a6b5bb80cca9.tar.bz2 scummvm-rg350-7ca6b29f35d522d78c583979a595a6b5bb80cca9.zip |
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
Diffstat (limited to 'common')
-rw-r--r-- | common/endian.h | 4 |
1 files changed, 2 insertions, 2 deletions
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]; |