Lots of str[n]cat, str[n]cpy, and [v]sprintf have been replaced by strlcat, strlcpy...
[xonotic/darkplaces.git] / menu.c
diff --git a/menu.c b/menu.c
index 825aaa7..7ca4c02 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -683,7 +683,7 @@ void M_ScanSaves (void)
                str = FS_Getline (f);
                sscanf (str, "%i\n", &version);
                str = FS_Getline (f);
-               strncpy (m_filenames[i], str, sizeof(m_filenames[i])-1);
+               strlcpy (m_filenames[i], str, sizeof (m_filenames[i]));
 
        // change _ back to space
                for (j=0 ; j<SAVEGAME_COMMENT_LENGTH ; j++)