fix sidebar counters.
[apps/madmutt.git] / curs_main.c
index fe65287..81d59c2 100644 (file)
@@ -445,7 +445,7 @@ int mutt_index_menu (void)
       sidebar_set_current (Context->path);
   }
 
-  FOREVER {
+  for (;;) {
     tag = 0;                    /* clear the tag-prefix */
 
     menu->max = Context ? Context->vcount : 0;
@@ -1202,13 +1202,13 @@ int mutt_index_menu (void)
 #endif
       {
         if (Context && Context->path)
-          strncpy (buf, Context->path, sizeof (buf));
+          m_strcpy(buf, sizeof(buf), Context->path);
         if (op != OP_SIDEBAR_OPEN)
           buffy_next (buf, sizeof (buf));
       }
 
       if (op == OP_SIDEBAR_OPEN) {
-        strncpy (buf, NONULL(sidebar_get_current ()), sizeof (buf));
+        m_strcpy(buf, sizeof(buf), sidebar_get_current());
       }
       else if (mutt_enter_fname (cp, buf, sizeof (buf), &menu->redraw, 1) == -1) {
         if (menu->menu == MENU_PAGER) {