Nico Golde:
[apps/madmutt.git] / curs_lib.c
index da846bb..6e55a2b 100644 (file)
  *     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
  */ 
 
+#if HAVE_CONFIG_H
+# include "config.h"
+#endif
+
 #include "mutt.h"
 #include "mutt_menu.h"
 #include "mutt_curses.h"
@@ -292,6 +296,7 @@ void mutt_query_exit (void)
 
 void mutt_curses_error (const char *fmt, ...)
 {
+  char TmpErrorbuf[STRING];
   va_list ap;
 
   va_start (ap, fmt);
@@ -299,8 +304,9 @@ void mutt_curses_error (const char *fmt, ...)
   va_end (ap);
   
   dprint (1, (debugfile, "%s\n", Errorbuf));
-  mutt_format_string (Errorbuf, sizeof (Errorbuf),
+  mutt_format_string (TmpErrorbuf, sizeof (TmpErrorbuf),
                       0, COLS-2, 0, 0, Errorbuf, sizeof (Errorbuf), 0);
+  snprintf(Errorbuf,sizeof(Errorbuf),"%s",TmpErrorbuf); /* overkill */
 
   if (!option (OPTKEEPQUIET))
   {
@@ -317,14 +323,16 @@ void mutt_curses_error (const char *fmt, ...)
 
 void mutt_curses_message (const char *fmt, ...)
 {
+  char TmpErrorbuf[STRING];
   va_list ap;
 
   va_start (ap, fmt);
   vsnprintf (Errorbuf, sizeof (Errorbuf), fmt, ap);
   va_end (ap);
 
-  mutt_format_string (Errorbuf, sizeof (Errorbuf),
+  mutt_format_string (TmpErrorbuf, sizeof (TmpErrorbuf),
                       0, COLS-2, 0, 0, Errorbuf, sizeof (Errorbuf), 0);
+  snprintf(Errorbuf,sizeof(Errorbuf),"%s",TmpErrorbuf); /* overkill */
 
   if (!option (OPTKEEPQUIET))
   {