aboutsummaryrefslogtreecommitdiff
path: root/zetsubou
diff options
context:
space:
mode:
Diffstat (limited to 'zetsubou')
-rw-r--r--zetsubou/tpl.c6
1 files 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);