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.

[originally from svn r9373]
This commit is contained in:
Simon Tatham
2011-12-28 18:07:46 +00:00
parent c4e486c2a1
commit 236f965093

1
gtk.c
View File

@ -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,