From ff4b7acff82513a36d041eca62f20117b90b5428 Mon Sep 17 00:00:00 2001 From: tTh Date: Mon, 8 Apr 2024 05:35:19 +0200 Subject: [PATCH] clean before use --- Tools/tga_applymap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Tools/tga_applymap.c b/Tools/tga_applymap.c index 18bee8a..9728af2 100644 --- a/Tools/tga_applymap.c +++ b/Tools/tga_applymap.c @@ -11,7 +11,7 @@ /*::------------------------------------------------------------------::*/ void usage(int flag) { -fprintf(stderr, "* tga_applymap v 0.0.14 [%s] (dwtfywl) Krabulator 1910\n", +fprintf(stderr, "* tga_applymap v 0.0.15 [%s] (dwtfywl) Krabulator 1910\n", TGA_OUTILS_VERSION); fprintf(stderr, " compiled %s at %s\n", __DATE__, __TIME__); @@ -38,6 +38,8 @@ if ( (src=Image_TGA_alloc_load(argv[2])) == NULL ) { exit(1); } +memset(&map, 0, sizeof(map)); + if ( (foo=Image_load_color_Map(argv[3], "map", &map)) ) { fprintf(stderr, "%s: %s: err%d %s\n", argv[0], argv[3], foo, Image_err2str(foo));