clean before use

This commit is contained in:
tTh 2024-04-08 05:35:19 +02:00
parent dda374fc7d
commit ff4b7acff8

View File

@ -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));