summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/maps.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-05-05 23:35:37 +0200
committerAdam Borowski <kilobyte@angband.pl>2013-05-05 23:38:25 +0200
commit6a4a6370bbc2e26acc501f171d0356159a10c147 (patch)
tree15558873d7e4df082bcddb8413e3f0f77956dba9 /crawl-ref/source/maps.cc
parent647616282bf1add526e80cd9434728f71522ca52 (diff)
downloadcrawl-ref-6a4a6370bbc2e26acc501f171d0356159a10c147.tar.gz
crawl-ref-6a4a6370bbc2e26acc501f171d0356159a10c147.zip
Fix breakage on big endian.
Not sure if it causes "merely" rebuilding the des cache on every startup, or the game not working at all -- I don't have a wrong endian machine to test, and qemu is slower than my phone. And my phone is from 2009.
Diffstat (limited to 'crawl-ref/source/maps.cc')
-rw-r--r--crawl-ref/source/maps.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc
index 6c46f1da0a..b12dc4856e 100644
--- a/crawl-ref/source/maps.cc
+++ b/crawl-ref/source/maps.cc
@@ -43,9 +43,9 @@
# error BYTE_ORDER is not defined
#endif
#if BYTE_ORDER == LITTLE_ENDIAN
-# define WORD_LEN sizeof(long)
+# define WORD_LEN (int8_t)sizeof(long)
#else
-# define WORD_LEN -sizeof(long)
+# define WORD_LEN -(int8_t)sizeof(long)
#endif
static map_section_type _write_vault(map_def &mdef,