From bce9b6d61d5b4c9cd8f8e29ddaaf9f4084a64cae Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 8 Nov 2008 06:57:49 +0000 Subject: Use sizeof(short) to calculate size for allocation. Subversion-branch: /branches/raven-branch Subversion-revision: 1378 --- src/heretic/r_data.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/heretic/r_data.c b/src/heretic/r_data.c index 994504f5..2192e8a6 100644 --- a/src/heretic/r_data.c +++ b/src/heretic/r_data.c @@ -410,8 +410,10 @@ void R_InitTextures(void) 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; -- cgit v1.2.3