hotfix: do not try to append file when none is specified

Thu, 11 Jul 2024 20:13:59 +0200

author
Mike Becker <universe@uap-core.de>
date
Thu, 11 Jul 2024 20:13:59 +0200
changeset 82
ce67b1b2e979
parent 81
9e483a0e3f52
child 83
75ae588389d4

hotfix: do not try to append file when none is specified

fixes #395

src/frontend.c file | annotate | diff | comparison | revisions
--- a/src/frontend.c	Thu Jul 11 20:05:26 2024 +0200
+++ b/src/frontend.c	Thu Jul 11 20:13:59 2024 +0200
@@ -44,6 +44,7 @@
 } Settings;
 
 static int appendfile(const char *filename, FILE *fout, const char *errmsg) {
+    if (filename == NULL) return 0; // nothing to append
     FILE *fin = fopen(filename, "r");
     if (!fin) {
         perror(errmsg);

mercurial