aboutsummaryrefslogtreecommitdiff
path: root/zetsubou
diff options
context:
space:
mode:
authorAlex Marshall <SquidMan72@gmail.com>2009-05-19 23:28:18 -0700
committerAlex Marshall <SquidMan72@gmail.com>2009-05-19 23:28:18 -0700
commitadf6d6243b2112f8fb0b6124205cd438688d59bd (patch)
treec2a173a80d9a513b6590f23f979047bce86817e9 /zetsubou
parentbb648c61281c8d85defba97d6154a9941b7ea669 (diff)
Yet again, more fixes
Diffstat (limited to 'zetsubou')
-rw-r--r--zetsubou/tpl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/zetsubou/tpl.c b/zetsubou/tpl.c
index 890b702..874db87 100644
--- a/zetsubou/tpl.c
+++ b/zetsubou/tpl.c
@@ -699,10 +699,10 @@ int TPL_ConvertToGD(u8* tplbuf, u32 tplsize, char basename[], u32 format)
tplpoint += 8;
texcount++;
}
- char *outname = malloc(strlen(basename) + 6);
+ char *outname = malloc(strlen(basename) + 8);
for(i = 0; i < texcount; i++) {
printf("Converting file %d.\n", i);
- memset(outname, 0, strlen(basename) + 6);
+ memset(outname, 0, strlen(basename) + 8);
sprintf(outname, "%s%02x.%s", basename, i, formatstr);
printf("Output to %s.\n", outname);
tplpoint = be32(TPLTextures[i][0]);
@@ -799,7 +799,7 @@ int TPL_ConvertToGD(u8* tplbuf, u32 tplsize, char basename[], u32 format)
}
gdImagePng(im, fileout);
fclose(fileout);
- memset(outname, 0, strlen(basename) + 6);
+ memset(outname, 0, strlen(basename) + 8);
sprintf(outname, "%s%02x.%s", basename, i, "met");
FILE* tplmeta = fopen(outname, "wb");
char tplheadstartmagic[] = {'T', 'P', 'L', 'M'};
@@ -988,10 +988,10 @@ int TPL_ConvertToBMP(u8* tplbuf, u32 tplsize, char basename[])
tplpoint += 8;
texcount++;
}
- char *outname = malloc(strlen(basename) + 6);
+ char *outname = malloc(strlen(basename) + 8);
for(i = 0; i < texcount; i++) {
printf("Converting file %d.\n", i);
- memset(outname, 0, strlen(basename) + 6);
+ memset(outname, 0, strlen(basename) + 8);
sprintf(outname, "%s%02x.bmp", basename, i);
printf("Output to %s.\n", outname);
tplpoint = be32(TPLTextures[i][0]);