Fix =sizeof-pointer-memaccess: argument to ‘sizeof’ in ‘strncpy’ call is the same expression as the source; did you mean to use the size of the destination?

This commit is contained in:
Alam Ed Arias 2018-11-14 16:25:56 -05:00
parent 6fa063375d
commit 4e9fc881a2
1 changed files with 1 additions and 1 deletions

View File

@ -3069,7 +3069,7 @@ static void readmaincfg(MYFILE *f)
strncpy(timeattackfolder, gamedatafilename, min(filenamelen, sizeof (timeattackfolder)));
timeattackfolder[min(filenamelen, sizeof (timeattackfolder) - 1)] = '\0';
strncpy(savegamename, timeattackfolder, sizeof (timeattackfolder));
strncpy(savegamename, timeattackfolder, strlen(timeattackfolder));
strlcat(savegamename, "%u.ssg", sizeof(savegamename));
// can't use sprintf since there is %u in savegamename
strcatbf(savegamename, srb2home, PATHSEP);