From d7de645deb3fc34a169a1f3e3944b04a9ecc5463 Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 11 Dec 2004 16:46:00 +0000 Subject: [PATCH] endian issues. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@633 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/skin.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/engine/client/skin.c b/engine/client/skin.c index 62d1db7f7..fd0d71c5c 100644 --- a/engine/client/skin.c +++ b/engine/client/skin.c @@ -178,8 +178,8 @@ qbyte *Skin_Cache8 (skin_t *skin) || pcx->version != 5 || pcx->encoding != 1 || pcx->bits_per_pixel != 8 - || pcx->xmax >= 320 - || pcx->ymax >= 200) + || (unsigned short)LittleShort(pcx->xmax) >= 320 + || (unsigned short)LittleShort(pcx->ymax) >= 200) { skin->failedload = true; Con_Printf ("Bad skin %s\n", name); @@ -188,6 +188,9 @@ qbyte *Skin_Cache8 (skin_t *skin) skin->width = 320; skin->height = 200; skin->cachedbpp = 8; + + pcx->xmax = (unsigned short)LittleShort(pcx->xmax); + pcx->ymax = (unsigned short)LittleShort(pcx->ymax); out = Cache_Alloc (&skin->cache, 320*200, skin->name); if (!out)