From: simon Date: Tue, 23 Aug 2005 12:49:21 +0000 (+0000) Subject: Don't report an error when loading a saved game from the command X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/commitdiff_plain/9354872162d7a3fbfba456a8f94b594483e7630c Don't report an error when loading a saved game from the command line unless there really _is_ an error! git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6203 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/gtk.c b/gtk.c index 6fef7b8..b72752a 100644 --- a/gtk.c +++ b/gtk.c @@ -1447,8 +1447,9 @@ static frontend *new_window(char *arg, char **error) " nor a save file (%.400s)", err, strerror(errno)); } else { err = midend_deserialise(fe->me, savefile_read, fp); - sprintf(errbuf, "%.800s", err); - fclose(fp); + if (err) + sprintf(errbuf, "%.800s", err); + fclose(fp); } } if (*errbuf) {