diff --git a/src/dehacked.c b/src/dehacked.c
index edc4e01d372aed3cb16c6a9cc3cb968e2afefd70..db1d6eed83ea45bcdca60625a15c6662011ad619 100644
--- a/src/dehacked.c
+++ b/src/dehacked.c
@@ -3080,7 +3080,7 @@ static void readmaincfg(MYFILE *f)
 				strncpy(timeattackfolder, gamedatafilename, min(filenamelen, sizeof (timeattackfolder)));
 				timeattackfolder[min(filenamelen, sizeof (timeattackfolder) - 1)] = '\0';
 
-				strncpy(savegamename, timeattackfolder, strlen(timeattackfolder));
+				strcpy(savegamename, timeattackfolder);
 				strlcat(savegamename, "%u.ssg", sizeof(savegamename));
 				// can't use sprintf since there is %u in savegamename
 				strcatbf(savegamename, srb2home, PATHSEP);