1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 17:38:00 +00:00

Fix reversed sense of test in rsa1_save_f.

It saves key files just fine, but then claims to have failed. (Worse, it
would claim to have succeeded if it _did_ fail!)
This commit is contained in:
Simon Tatham 2020-01-10 19:25:38 +00:00
parent 50fce01958
commit 0a3fc21e23

View File

@ -423,7 +423,7 @@ bool rsa1_save_f(const Filename *filename, RSAKey *key, const char *passphrase)
return false;
strbuf *buf = rsa1_save_sb(key, passphrase);
bool toret = fwrite(buf->s, 1, buf->len, fp) != buf->len;
bool toret = fwrite(buf->s, 1, buf->len, fp) == buf->len;
if (fclose(fp))
toret = false;
strbuf_free(buf);