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!)

This commit is contained in:
Ragnvald Maartmann-Moe IV 2000-12-20 19:39:59 +00:00
parent dae1954eaf
commit 1c235242f9

View file

@ -1177,8 +1177,8 @@ GL_Upload32 (unsigned int *data, int width, int height, qboolean mipmap,
if (! if (!
(scaled = (scaled =
malloc (scaled_width * scaled_height * 4 * malloc (scaled_width * scaled_height *
sizeof (unsigned int)))) Sys_Error ("GL_LoadTexture: too big"); sizeof (GL_4_BYTES)))) Sys_Error ("GL_LoadTexture: too big");
samples = alpha ? gl_alpha_format : gl_solid_format; samples = alpha ? gl_alpha_format : gl_solid_format;