From: havoc Date: Sun, 29 Apr 2018 09:23:09 +0000 (+0000) Subject: Fix Image_GenerateNoTexture, it was using a wrong stride, resulting in a very bogus... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2c118b10a5d55a8ddd9e4da33983dfa2879e97c0;p=xonotic%2Fdarkplaces.git Fix Image_GenerateNoTexture, it was using a wrong stride, resulting in a very bogus image with the bottom half being black. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12402 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/image.c b/image.c index 9e3f0fd6..77b9435e 100644 --- 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;