"dc_numlights >= dc_maxlights"
if (frontsector->numlights)
{
dc_numlights = frontsector->numlights;
if (dc_numlights >= dc_maxlights)
{
dc_maxlights = dc_numlights;
dc_lightlist = Z_Realloc(dc_lightlist, sizeof (*dc_lightlist) * dc_maxlights, PU_STATIC, NULL);
}
R_StoreWallRange
and R_RenderMaskedSegRange
have the same issue: they both reallocate dc_lightlist
if dc_numlights
is greater than or equal to dc_maxlights.
R_RenderMaskedSegRange
does not do that:
if (frontsector->numlights)
{
dc_numlights = frontsector->numlights;
if (dc_numlights > dc_maxlights)
{
dc_maxlights = dc_numlights;
dc_lightlist = Z_Realloc(dc_lightlist, sizeof (*dc_lightlist) * dc_maxlights, PU_STATIC, NULL);
}
Edited by Lactozilla