mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-03 06:51:11 +00:00
Don't allow a gamedata named the same as the default time attack folder
That'd be kinda scary!
This commit is contained in:
parent
bcfe0da8fc
commit
4a520e63c6
1 changed files with 3 additions and 1 deletions
|
@ -2901,7 +2901,9 @@ static boolean GoodDataFileName(const char *s)
|
||||||
p = s + strlen(s) - strlen(tail);
|
p = s + strlen(s) - strlen(tail);
|
||||||
if (p <= s) return false; // too short
|
if (p <= s) return false; // too short
|
||||||
if (!fasticmp(p, tail)) return false; // doesn't end in .dat
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue