Fix crashes on non-special stars.

This commit is contained in:
2024-05-03 04:01:24 -04:00
parent 902048134c
commit 8a9be277ae
+5 -2
View File
@@ -279,8 +279,11 @@ BuildGroups (void)
DWORD d_squared; DWORD d_squared;
const char *const race_name = HomeWorld[Index]; const char *const race_name = HomeWorld[Index];
if (race_name && !strcmp(CurStarDescPtr->supplement, race_name) && if (race_name &&
(CurStarDescPtr->supArg == 0 || !strcmp(CurStarDescPtr->supArg, "Homeworld"))) (CurStarDescPtr->supplement
&& !strcmp(CurStarDescPtr->supplement, race_name))
&& (CurStarDescPtr->supArg == 0
|| !strcmp(CurStarDescPtr->supArg, "Homeworld")))
{ // In general, there are always ships at the Homeworld for { // In general, there are always ships at the Homeworld for
// the races specified in HomeWorld[] array. // the races specified in HomeWorld[] array.
BestIndex = Index; BestIndex = Index;