fixed targa quake sky loading
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 1 Feb 2003 08:42:18 +0000 (08:42 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 1 Feb 2003 08:42:18 +0000 (08:42 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@2725 d7cf8633-e32d-0410-b094-e92efae38249

r_sky.c

diff --git a/r_sky.c b/r_sky.c
index d5b21c0..631da10 100644 (file)
--- a/r_sky.c
+++ b/r_sky.c
@@ -347,7 +347,7 @@ void R_InitSky (qbyte *src, int bytesperpixel)
        {
                for (i = 0;i < 128;i++)
                        for (j = 0;j < 128;j++)
-                               trans[(i*128) + j] = src[i*256+j+128];
+                               trans[(i*128) + j] = ((unsigned *)src)[i*256+j+128];
        }
        else
        {
@@ -381,7 +381,7 @@ void R_InitSky (qbyte *src, int bytesperpixel)
        {
                for (i = 0;i < 128;i++)
                        for (j = 0;j < 128;j++)
-                               trans[(i*128) + j] = src[i*256+j];
+                               trans[(i*128) + j] = ((unsigned *)src)[i*256+j];
        }
        else
        {