endian issues.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@633 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-12-11 16:46:00 +00:00
parent 0202601875
commit d7de645deb

View file

@ -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)