ansilove

ANSI and ASCII art to PNG converter in C
Log | Files | Refs | README | LICENSE

commit 8cb92b05ce45e88f914a4449a2ff999d6d377325
parent 729969a6adb83150601dbe6941e0ef2594500d7a
Author: Frederic Cambus <fred@statdns.com>
Date:   Tue, 18 Dec 2018 14:14:42 +0100

Add error handling for the loaders calls

Diffstat:
Msrc/main.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/main.c b/src/main.c @@ -258,7 +258,10 @@ main(int argc, char *argv[]) fileIsANSi = true; } - loader(&ctx, &options); + if (loader(&ctx, &options) == -1) { + fprintf(stderr, "\n%s\n", ansilove_error(&ctx)); + return EXIT_FAILURE; + } /* create the output file */ if (ansilove_savefile(&ctx, fileName) == -1) {