summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2008-11-08 06:57:49 +0000
committerSimon Howard2008-11-08 06:57:49 +0000
commitbce9b6d61d5b4c9cd8f8e29ddaaf9f4084a64cae (patch)
treec02f9633f47f421b84e8eed02d203571da11b02a /src
parent76e08671f3afc0e26d7d2f2d3d06536e4eb994b4 (diff)
downloadchocolate-doom-bce9b6d61d5b4c9cd8f8e29ddaaf9f4084a64cae.tar.gz
chocolate-doom-bce9b6d61d5b4c9cd8f8e29ddaaf9f4084a64cae.tar.bz2
chocolate-doom-bce9b6d61d5b4c9cd8f8e29ddaaf9f4084a64cae.zip
Use sizeof(short) to calculate size for allocation.
Subversion-branch: /branches/raven-branch Subversion-revision: 1378
Diffstat (limited to 'src')
-rw-r--r--src/heretic/r_data.c6
1 files changed, 4 insertions, 2 deletions
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;