Don't allow custom gamedata to overwrite kart gamedata or replay folders

This commit is contained in:
TehRealSalt 2019-05-02 12:58:02 -04:00
parent 489032f734
commit 98dbdd7db5
1 changed files with 6 additions and 5 deletions

View File

@ -2142,11 +2142,12 @@ 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
#ifdef DELFILE
if (fasticmp(s, "gamedata.dat") && !disableundo) return false;
#else
if (fasticmp(s, "gamedata.dat")) return false;
#endif
if (fasticmp(s, "gamedata.dat")) return false; // Vanilla SRB2 gamedata
if (fasticmp(s, "main.dat")) return false; // Vanilla SRB2 time attack replay folder
if (fasticmp(s, "kartdata.dat")) return false; // SRB2Kart gamedata
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;
}