Oversight for debugchallenges: use the correct numeric value for debugchallenges highlight

Avoids dereferencing ref->conditionset, given ref can be NULL for blank squares
This commit is contained in:
toaster 2024-04-01 18:14:48 +01:00
parent d1910a6574
commit 7b2e0f9491

View file

@ -6801,12 +6801,17 @@ drawborder:
}
#ifdef DEVELOP
if (cv_debugchallenges.value == -2 ||
cv_debugchallenges.value > 0)
if (
(
cv_debugchallenges.value == -2
|| cv_debugchallenges.value > 0
)
&& num < MAXUNLOCKABLES
)
{
// Display the conditionset for this tile.
V_DrawThinString(x, y,
ref->conditionset == cv_debugchallenges.value ? V_AQUAMAP : V_GRAYMAP,
num+1 == cv_debugchallenges.value ? V_AQUAMAP : V_GRAYMAP,
va("%u", num+1));
}
#endif