Fix crashes on non-special stars.
This commit is contained in:
@@ -279,8 +279,11 @@ BuildGroups (void)
|
||||
DWORD d_squared;
|
||||
|
||||
const char *const race_name = HomeWorld[Index];
|
||||
if (race_name && !strcmp(CurStarDescPtr->supplement, race_name) &&
|
||||
(CurStarDescPtr->supArg == 0 || !strcmp(CurStarDescPtr->supArg, "Homeworld")))
|
||||
if (race_name &&
|
||||
(CurStarDescPtr->supplement
|
||||
&& !strcmp(CurStarDescPtr->supplement, race_name))
|
||||
&& (CurStarDescPtr->supArg == 0
|
||||
|| !strcmp(CurStarDescPtr->supArg, "Homeworld")))
|
||||
{ // In general, there are always ships at the Homeworld for
|
||||
// the races specified in HomeWorld[] array.
|
||||
BestIndex = Index;
|
||||
|
||||
Reference in New Issue
Block a user