From 2c118b10a5d55a8ddd9e4da33983dfa2879e97c0 Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 29 Apr 2018 09:23:09 +0000 Subject: [PATCH] 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 --- image.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- 2.39.2