From: Simon Tatham 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://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=d558bb240a07bae9799edcf0583b8fa2a0496d53;p=sgt-puzzles.git Don't report an error when loading a saved game from the command line unless there really _is_ an error! [originally from svn r6203] --- 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) {