From: simon Date: Wed, 28 Dec 2011 18:07:46 +0000 (+0000) Subject: Fix bug in --save caused by failure to initialise ctx.error to zero X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/puzzles/commitdiff_plain/2337bd6d9f9f1cc31c33f34034c584d8ba6c87b7 Fix bug in --save caused by failure to initialise ctx.error to zero before later checking to see if an errno code was dumped in it. git-svn-id: svn://svn.tartarus.org/sgt/puzzles@9373 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/gtk.c b/gtk.c index 1af877c..e6a0366 100644 --- a/gtk.c +++ b/gtk.c @@ -2705,6 +2705,7 @@ int main(int argc, char **argv) return 1; } sfree(realname); + ctx.error = 0; midend_serialise(me, savefile_write, &ctx); if (ctx.error) { fprintf(stderr, "%s: write: %s\n", realname,