]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Fix Image_GenerateNoTexture, it was using a wrong stride, resulting in a very bogus...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 29 Apr 2018 09:23:09 +0000 (09:23 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 29 Apr 2018 09:23:09 +0000 (09:23 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12402 d7cf8633-e32d-0410-b094-e92efae38249

image.c

diff --git a/image.c b/image.c
index 9e3f0fd64472a03e0bcea0d7dce15f35fa256529..77b9435e66695d1cf3d1638bc667dfd323af4beb 100644 (file)
--- a/image.c
+++ b/image.c
@@ -1894,10 +1894,10 @@ unsigned char *Image_GenerateNoTexture(void)
        {
                for (x = 0; x < 16; x++)
                {
-                       data[(y * 8 + x) * 4 + 0] =
-                               data[(y * 8 + x) * 4 + 1] =
-                               data[(y * 8 + x) * 4 + 2] = (y < 8) ^ (x < 8) ? 128 : 64;
-                       data[(y * 8 + x) * 4 + 3] = 255;
+                       data[(y * 16 + x) * 4 + 0] =
+                       data[(y * 16 + x) * 4 + 1] =
+                       data[(y * 16 + x) * 4 + 2] = (y < 8) ^ (x < 8) ? 128 : 64;
+                       data[(y * 16 + x) * 4 + 3] = 255;
                }
        }
        return data;