From 0af6863552b327a7799982ffbb44035bbd22228f Mon Sep 17 00:00:00 2001 From: havoc Date: Sat, 26 Feb 2011 17:55:03 +0000 Subject: [PATCH] fix a crash with non-power-of-two particle textures git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10866 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_textures.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gl_textures.c b/gl_textures.c index fc027b2f..0f08b5f9 100644 --- a/gl_textures.c +++ b/gl_textures.c @@ -1156,7 +1156,7 @@ static void R_UploadFullTexture(gltexture_t *glt, const unsigned char *data) { // multiply RGB channels by A channel before uploading int alpha; - for (i = 0;i < width*height*depth*4;i += 4) + for (i = 0;i < glt->inputwidth*glt->inputheight*glt->inputdepth*4;i += 4) { alpha = prevbuffer[i+3]; colorconvertbuffer[i] = (prevbuffer[i] * alpha) >> 8; -- 2.39.2