menu.c (M_ScanSaves): silence gcc8 -Wstringop-truncation:

just replaced strncpy() with q_strlcpy().

git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1592 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
sezero 2018-09-21 12:10:06 +00:00
parent 7c4ebaaae8
commit 9909888c0b

View file

@ -440,7 +440,7 @@ void M_ScanSaves (void)
continue;
fscanf (f, "%i\n", &version);
fscanf (f, "%79s\n", name);
strncpy (m_filenames[i], name, sizeof(m_filenames[i])-1);
q_strlcpy (m_filenames[i], name, SAVEGAME_COMMENT_LENGTH+1);
// change _ back to space
for (j = 0; j < SAVEGAME_COMMENT_LENGTH; j++)