mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-14 03:40:50 +00:00
- Blood: validate .ini files before using them.
They must at least have one "Episode?" section to be accepted.
This commit is contained in:
parent
7a99b6376e
commit
6576adb80b
1 changed files with 13 additions and 1 deletions
|
@ -126,7 +126,19 @@ static const char* DefFile(void)
|
|||
if (ext.CompareNoCase(".ini") == 0)
|
||||
{
|
||||
if (fileSystem.CheckNumForFullName(fn) != i) continue;
|
||||
if (found == -1) found = i;
|
||||
if (found == -1)
|
||||
{
|
||||
IniFile inif(fn);
|
||||
for (int j = 1; j <= 6; j++)
|
||||
{
|
||||
FStringf key("Episode%d", j);
|
||||
if (inif.FindKey(key))
|
||||
{
|
||||
found = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
found = -1;
|
||||
|
|
Loading…
Reference in a new issue