diff options
| author | Alex Marshall <SquidMan72@gmail.com> | 2009-05-19 23:41:18 -0700 |
|---|---|---|
| committer | Alex Marshall <SquidMan72@gmail.com> | 2009-05-19 23:41:18 -0700 |
| commit | 7b7ef5bf8882efe5d92b33fb308bdbba3e7aa00f (patch) | |
| tree | 3781585c7fb5da227b0eb0d47fbaa402bc930ab9 | |
| parent | 8b02fef94e84e5e9d5c17589195dabfe4e8d5ab6 (diff) | |
Should be last fix for RGBA8
| -rw-r--r-- | zetsubou/main.c | 3 | ||||
| -rw-r--r-- | zetsubou/tpl.c | 2 |
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; |
