From 379a08157f79fd758a7eeba67a974607c4ada4d4 Mon Sep 17 00:00:00 2001 From: Michael Elkins Date: Mon, 14 Jan 2013 08:50:48 -0800 Subject: [PATCH] avoid debug warning about trailing whitespace in a base64 encoded attachment closes #3558 --- handler.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/handler.c b/handler.c index 13c89ecc5..fa4e48d06 100644 --- a/handler.c +++ b/handler.c @@ -306,8 +306,10 @@ void mutt_decode_base64 (STATE *s, long len, int istext, iconv_t cd) } if (i != 4) { - dprint (2, (debugfile, "%s:%d [mutt_decode_base64()]: " - "didn't get a multiple of 4 chars.\n", __FILE__, __LINE__)); + /* "i" may be zero if there is trailing whitespace, which is not an error */ + if (i != 0) + dprint (2, (debugfile, "%s:%d [mutt_decode_base64()]: " + "didn't get a multiple of 4 chars.\n", __FILE__, __LINE__)); break; } -- 2.40.0