ref: bce9b6d61d5b4c9cd8f8e29ddaaf9f4084a64cae
parent: 76e08671f3afc0e26d7d2f2d3d06536e4eb994b4
author: Simon Howard <[email protected]>
date: Sat Nov 8 01:57:49 EST 2008
Use sizeof(short) to calculate size for allocation. Subversion-branch: /branches/raven-branch Subversion-revision: 1378
--- a/src/heretic/r_data.c
+++ b/src/heretic/r_data.c
@@ -410,8 +410,10 @@
I_Error("R_InitTextures: Missing patch in texture %s",
texture->name);
}
- texturecolumnlump[i] = Z_Malloc(texture->width * 2, PU_STATIC, 0);
- texturecolumnofs[i] = Z_Malloc(texture->width * 2, PU_STATIC, 0);
+ texturecolumnlump[i] = Z_Malloc(texture->width * sizeof(short),
+ PU_STATIC, 0);
+ texturecolumnofs[i] = Z_Malloc(texture->width * sizeof(short),
+ PU_STATIC, 0);
j = 1;
while (j * 2 <= texture->width)
j <<= 1;