fix wrong sign comparison

This commit is contained in:
Ricardo Luís Vaz Silva 2025-08-08 05:49:03 -03:00
commit d411893e44

View file

@ -671,7 +671,7 @@ void FDynamicLight::UnlinkLight()
auto sidedef = touchlists.wall_tlist[i];
if (!sidedef) continue;
if(Level->lightlists.wall_dlist.SSize() < sidedef->Index())
if(Level->lightlists.wall_dlist.SSize() > sidedef->Index())
{
Level->lightlists.wall_dlist[sidedef->Index()].Remove(this);
}
@ -682,7 +682,7 @@ void FDynamicLight::UnlinkLight()
auto sec = touchlists.flat_tlist[i];
if (!sec) continue;
if(Level->lightlists.flat_dlist.SSize() < sec->Index())
if(Level->lightlists.flat_dlist.SSize() > sec->Index())
{
Level->lightlists.flat_dlist[sec->Index()].Remove(this);
}