mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-21 19:31:04 +00:00
Don't allow custom gamedata to overwrite kart gamedata or replay folders
This commit is contained in:
parent
489032f734
commit
98dbdd7db5
1 changed files with 6 additions and 5 deletions
|
@ -2142,11 +2142,12 @@ 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
|
||||||
#ifdef DELFILE
|
|
||||||
if (fasticmp(s, "gamedata.dat") && !disableundo) return false;
|
if (fasticmp(s, "gamedata.dat")) return false; // Vanilla SRB2 gamedata
|
||||||
#else
|
if (fasticmp(s, "main.dat")) return false; // Vanilla SRB2 time attack replay folder
|
||||||
if (fasticmp(s, "gamedata.dat")) return false;
|
if (fasticmp(s, "kartdata.dat")) return false; // SRB2Kart gamedata
|
||||||
#endif
|
if (fasticmp(s, "kart.dat")) return false; // SRB2Kart time attack replay folder
|
||||||
|
if (fasticmp(s, "online.dat")) return false; // SRB2Kart online replay folder
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue