From: pdmef Date: Mon, 22 Aug 2005 20:16:56 +0000 (+0000) Subject: Rocco Rutte: X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=commitdiff_plain;h=3db1eed8cb47ae930ec78a1dc6576f608363da85 Rocco Rutte: - merge in latest mutt changes git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@424 e385b8ad-14ed-0310-8656-cc95a2468c6d --- diff --git a/pgp.c b/pgp.c index 53ff14b..779b2f4 100644 --- a/pgp.c +++ b/pgp.c @@ -369,14 +369,17 @@ int pgp_application_pgp_handler (BODY * m, STATE * s) } /* treat empty result as sign of failure */ - rewind (pgpout); - if ((c = fgetc (pgpout)) == EOF) { + if (pgpout) { + rewind (pgpout); + c = fgetc (pgpout); + ungetc (c, pgpout); + } + if (!pgpout || c == EOF) { mutt_error _("Could not decrypt PGP message"); pgp_void_passphrase (); rc = -1; goto out; } - ungetc (c, pgpout); } /*