nasty bug fixed in fimgfx

This commit is contained in:
tth 2020-02-19 22:32:24 +01:00
parent 865c226051
commit 5a66118f8b
1 changed files with 6 additions and 4 deletions

View File

@ -48,7 +48,7 @@ for (n=0, fx=fx_list; fx->name; fx++, n++) {
fprintf(stderr, "-> %3d %s\n", n, fx->name); fprintf(stderr, "-> %3d %s\n", n, fx->name);
#endif #endif
if (!strcmp(fx->name, txt)) { if (!strcmp(fx->name, txt)) {
return n; return fx->id;
} }
} }
return -1; /* NOT FOUND */ return -1; /* NOT FOUND */
@ -83,9 +83,9 @@ static void help(int lvl)
{ {
Fx *fx; Fx *fx;
puts("------ fimg special effects ------"); printf("-- fimg special effects %s %s --", __DATE__, __TIME__);
puts("usage:"); puts("usage:");
puts("\tfimgfix [options] <effect> source.fimg resultat.fimg"); puts("\tfimgfx [options] <effect> source.fimg resultat.fimg");
puts("options:"); puts("options:");
puts("\t-k N.N\tset the floating value"); puts("\t-k N.N\tset the floating value");
@ -97,6 +97,7 @@ for (fx=fx_list; fx->name; fx++) {
printf("%s ", fx->name); printf("%s ", fx->name);
} }
puts(""); puts("");
fimg_print_version(1);
exit(0); exit(0);
} }
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
@ -148,7 +149,8 @@ switch (act) {
return -3; return -3;
default: default:
fprintf(stderr, "*** %s : %d is bad action\n", __func__, act); fprintf(stderr, "%s %s : %d is bad action\n",
__FILE__, __func__, act);
break; break;
} }