From ddfa9eec1b298de66f55a8a9d3cd82283c91e3d2 Mon Sep 17 00:00:00 2001 From: Alex Marshall Date: Tue, 19 May 2009 23:14:12 -0700 Subject: more fixes --- zetsubou/tpl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zetsubou/tpl.c b/zetsubou/tpl.c index 1e80b16..890b702 100644 --- a/zetsubou/tpl.c +++ b/zetsubou/tpl.c @@ -699,7 +699,7 @@ int TPL_ConvertToGD(u8* tplbuf, u32 tplsize, char basename[], u32 format) tplpoint += 8; texcount++; } - char *outname = (char*)malloc(strlen(basename) + 3); + char *outname = malloc(strlen(basename) + 6); for(i = 0; i < texcount; i++) { printf("Converting file %d.\n", i); memset(outname, 0, strlen(basename) + 6); @@ -867,7 +867,7 @@ int TPL_ConvertFromGDs(const u32 count, char *gds[], char outname[], u32 format, u8* bitmapdata = (u8*)malloc(width * height * 4); memset(bitmapdata, 0, width * height * 4); u8* tplbuf; - u32 iv, x, y, z; + u32 x, y; for(y = 0; y < height; y++) { for(x = 0; x < width; x++) { u32 p; @@ -988,7 +988,7 @@ int TPL_ConvertToBMP(u8* tplbuf, u32 tplsize, char basename[]) tplpoint += 8; texcount++; } - char *outname = (char*)malloc(strlen(basename) + 3); + char *outname = malloc(strlen(basename) + 6); for(i = 0; i < texcount; i++) { printf("Converting file %d.\n", i); memset(outname, 0, strlen(basename) + 6); -- cgit v1.3.1