less horrible strncpy's
[apps/madmutt.git] / curs_main.c
index 03315f2..81d59c2 100644 (file)
@@ -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) {