aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zetsubou/main.c3
-rw-r--r--zetsubou/tpl.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/zetsubou/main.c b/zetsubou/main.c
index cd410bf..f15d00c 100644
--- a/zetsubou/main.c
+++ b/zetsubou/main.c
@@ -25,7 +25,7 @@ void bad_args(char progname[])
int main(int argc, char *argv[])
{
- printf("Zetsubou v0.1. Written by SquidMan (Alex Marshall)\nFormat information from YAGCD. RGB5A3 code by booto. CMP code by segher.\nBased off of gentpl by comex.\n\n");
+ printf("Zetsubou v0.1. Written by SquidMan (Alex Marshall)\nFormat information from YAGCD. RGB5A3 code by booto. CMP code by segher.\nLightly based off of gentpl by comex.\n\n");
if(argc < 3)
bad_args(argv[0]);
char type = toupper(argv[1][0]);
@@ -56,6 +56,7 @@ int main(int argc, char *argv[])
else
bad_args(argv[0]);
ret = TPL_ConvertToGD(tplbuf, tplsize, basename, outfmt);
+ free(tplbuf);
free(basename);
if(ret < 0) {
printf("Error converting from TPL.\n");
diff --git a/zetsubou/tpl.c b/zetsubou/tpl.c
index 535e0ff..c6106c7 100644
--- a/zetsubou/tpl.c
+++ b/zetsubou/tpl.c
@@ -95,6 +95,8 @@ int TPL_ConvertRGBA8ToBitMap(u8* tplbuf, u32 tplsize, u32 tplpoint, u8** bitmapd
u32 goodheight = height;
u32 x, y;
u32 x1, y1;
+ if(*bitmapdata != NULL)
+ free(*bitmapdata);
*bitmapdata = (u8*)calloc(width * height, 4);
if(*bitmapdata == NULL)
return -1;