Check for blockmap overflow in P_BlockLinesIterator. Under RANGECHECK define.

This commit is contained in:
entryway authored and Alug committed 2026-06-20 17:14:10 +02:00
1 parent 47f895fa5d
commit 892f99f3a8
1 file changed
+4
+4
View File
@@ -972,6 +972,10 @@ boolean P_BlockLinesIterator(INT32 x, INT32 y, boolean (*func)(line_t *))
// First index is really empty, so +1 it.
for (list = blockmaplump + offset + 1; *list != -1; list++)
{
#ifdef RANGECHECK
if (*list < 0 || (UINT32)*list >= numlines)
I_Error("P_BlockLinesIterator: index >= numlines");
#endif
ld = &lines[*list];
if (ld->validcount == validcount)