]> granicus.if.org Git - neomutt/commitdiff
avoid debug warning about trailing whitespace in a base64 encoded attachment
authorMichael Elkins <me@sigpipe.org>
Mon, 14 Jan 2013 16:50:48 +0000 (08:50 -0800)
committerMichael Elkins <me@sigpipe.org>
Mon, 14 Jan 2013 16:50:48 +0000 (08:50 -0800)
closes #3558

handler.c

index 13c89ecc5194e31abc6e165348360281fdcd8fe7..fa4e48d06a4fa40821062669c1ab87ee6a169826 100644 (file)
--- 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;
     }