less horrible strncpy's
[apps/madmutt.git] / makedoc.c
index 3148ca4..6910e54 100644 (file)
--- a/makedoc.c
+++ b/makedoc.c
@@ -31,6 +31,7 @@
 #include <ctype.h>
 
 #include <errno.h>
+#include <lib-lib/str.h>
 
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
@@ -519,7 +520,7 @@ static void handle_confline (char *s)
     if (!strcmp (buff, "}"))
       break;
 
-    strncpy (val + STRLEN (val), buff, sizeof (val) - STRLEN (val));
+    m_strcat(val, sizeof(val), buff);
   }
   while ((s = get_token (buff, sizeof (buff), s)));