From 150790c84f1773cfc82b13953d7894cd25474a83 Mon Sep 17 00:00:00 2001 From: johannes Date: Sun, 3 Mar 2024 16:55:50 +0100 Subject: added freeargs --- src/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 085e416..2889601 100644 --- a/src/main.c +++ b/src/main.c @@ -50,7 +50,10 @@ void setdemo(arg *argument) { demofile = fopen(argument->opts[0], "r"); if (!demofile) - exitperror("Error: failed to open demofile, reason"); + { + fprintf(stderr, "Error: failed to open demofile '%s', ", argument->opts[0]); + exitperror("reason"); + } if (readdemo(demofile, &DEMO) < 0) { fprintf(stderr, "Error: failed to parse demo\n"); @@ -207,5 +210,7 @@ int main(int argc, char *argv[]) if (outarg) runoutput(outarg); + freeargs(); + exit(EXIT_SUCCESS); } -- cgit v1.2.3