From 1c235242f900a9fd969118e06e431cd4ccf54f43 Mon Sep 17 00:00:00 2001 From: Ragnvald Maartmann-Moe IV Date: Wed, 20 Dec 2000 19:39:59 +0000 Subject: [PATCH] Fix for memory waste noticed by LordHavoc: 4*sizeof(unsigned int) (4* needed size!) to GL_4_BYTES (nice portable GL types, we should use them everywhere!) --- source/gl_draw.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/gl_draw.c b/source/gl_draw.c index 266ffed..6fd0271 100644 --- a/source/gl_draw.c +++ b/source/gl_draw.c @@ -1177,8 +1177,8 @@ GL_Upload32 (unsigned int *data, int width, int height, qboolean mipmap, if (! (scaled = - malloc (scaled_width * scaled_height * 4 * - sizeof (unsigned int)))) Sys_Error ("GL_LoadTexture: too big"); + malloc (scaled_width * scaled_height * + sizeof (GL_4_BYTES)))) Sys_Error ("GL_LoadTexture: too big"); samples = alpha ? gl_alpha_format : gl_solid_format;