Fix bug in --save caused by failure to initialise ctx.error to zero
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 28 Dec 2011 18:07:46 +0000 (18:07 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Wed, 28 Dec 2011 18:07:46 +0000 (18:07 +0000)
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

gtk.c

diff --git a/gtk.c b/gtk.c
index 1af877c..e6a0366 100644 (file)
--- 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,