diff options
author | Simon Howard | 2008-11-08 06:57:49 +0000 |
---|---|---|
committer | Simon Howard | 2008-11-08 06:57:49 +0000 |
commit | bce9b6d61d5b4c9cd8f8e29ddaaf9f4084a64cae (patch) | |
tree | c02f9633f47f421b84e8eed02d203571da11b02a /src | |
parent | 76e08671f3afc0e26d7d2f2d3d06536e4eb994b4 (diff) | |
download | chocolate-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.c | 6 |
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; |