mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Don't allow custom gamedata to overwrite kart gamedata or replay folders
This commit is contained in:
parent
b679cfe5c5
commit
9a1ae859bd
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…
Add table
Reference in a new issue