mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 05:11:34 +00:00
Fix savegamename being improperly built due to missing null char after copying timeattackfolder
This commit is contained in:
parent
1029463741
commit
b84470ec51
1 changed files with 1 additions and 1 deletions
|
@ -3080,7 +3080,7 @@ static void readmaincfg(MYFILE *f)
|
||||||
strncpy(timeattackfolder, gamedatafilename, min(filenamelen, sizeof (timeattackfolder)));
|
strncpy(timeattackfolder, gamedatafilename, min(filenamelen, sizeof (timeattackfolder)));
|
||||||
timeattackfolder[min(filenamelen, sizeof (timeattackfolder) - 1)] = '\0';
|
timeattackfolder[min(filenamelen, sizeof (timeattackfolder) - 1)] = '\0';
|
||||||
|
|
||||||
strncpy(savegamename, timeattackfolder, strlen(timeattackfolder));
|
strcpy(savegamename, timeattackfolder);
|
||||||
strlcat(savegamename, "%u.ssg", sizeof(savegamename));
|
strlcat(savegamename, "%u.ssg", sizeof(savegamename));
|
||||||
// can't use sprintf since there is %u in savegamename
|
// can't use sprintf since there is %u in savegamename
|
||||||
strcatbf(savegamename, srb2home, PATHSEP);
|
strcatbf(savegamename, srb2home, PATHSEP);
|
||||||
|
|
Loading…
Reference in a new issue