]> granicus.if.org Git - neomutt/commitdiff
Fix off-by-one in error message
authorAntonio Radici <antonio@dyne.org>
Mon, 12 Sep 2016 16:23:12 +0000 (17:23 +0100)
committerRichard Russon <rich@flatcap.org>
Mon, 12 Sep 2016 16:23:12 +0000 (17:23 +0100)
Closes: #139
send.c

diff --git a/send.c b/send.c
index 9de84d7bffbb8812e65fff61d95e67feceab5f9c..bceb4574ba159e7bb27bff96534d9ce3c18bd1b0 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1913,7 +1913,7 @@ main_loop:
       if (snprintf (errorstr, STRING,
         _("Message contains magic keyword \"%s\", but no attachments. Not sending."), AttachKeyword) == -1)
       {
-        errorstr[STRING] = 0; // terminate if need be. our string shouldn't be this long.
+        errorstr[STRING - 1] = 0; // terminate if need be. our string shouldn't be this long.
       }
       mutt_error (errorstr);
     }