diff options
| author | johannes <johannes.herman@gmail.com> | 2024-03-03 16:55:50 +0100 |
|---|---|---|
| committer | johannes <johannes.herman@gmail.com> | 2024-03-03 16:55:50 +0100 |
| commit | 150790c84f1773cfc82b13953d7894cd25474a83 (patch) | |
| tree | e48ea734979e4e0111a4c26172887e4afeb232b2 /src/main.c | |
| parent | 9a14ce4b99dea312fe508153d6d8ccc56c27c69a (diff) | |
added freeargs
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); } |
