- ignore GRPINFOs without a defined game.

These can cause unpredictable behavior, including crashes.
This commit is contained in:
Christoph Oelckers 2020-02-16 20:18:07 +01:00
parent 3cd2b92dd1
commit 40cbaf969c

View file

@ -553,6 +553,11 @@ static TArray<GrpInfo> ParseGrpInfo(const char *fn, FileReader &fr, TMap<FString
}
else sc.ScriptError(nullptr);
}
if (grp.dependencyCRC == 0 && (grp.flags & (GAMEFLAG_DUKE | GAMEFLAG_NAM | GAMEFLAG_NAPALM | GAMEFLAG_WW2GI | GAMEFLAG_FURY | GAMEFLAG_RR | GAMEFLAG_RRRA | GAMEFLAG_BLOOD | GAMEFLAG_SW | GAMEFLAG_PSEXHUMED)) == 0)
{
sc.ScriptMessage("Warning: GRP without game defined. Ignoring");
groups.Pop();
}
}
else sc.ScriptError(nullptr);
}