Don't allow a gamedata named the same as the default time attack folder

That'd be kinda scary!
This commit is contained in:
Sally Coolatta 2022-02-27 10:33:58 -05:00
parent bcfe0da8fc
commit 4a520e63c6

View file

@ -2901,7 +2901,9 @@ static boolean GoodDataFileName(const char *s)
p = s + strlen(s) - strlen(tail);
if (p <= s) return false; // too short
if (!fasticmp(p, tail)) return false; // doesn't end in .dat
if (fasticmp(s, "gamedata.dat")) return false;
if (fasticmp(s, "gamedata.dat")) return false; // Don't overwrite default gamedata
if (fasticmp(s, "main.dat")) return false; // Don't overwrite default time attack replays
return true;
}