diff --git a/src/p_3dmidtex.cpp b/src/p_3dmidtex.cpp index ef449ecd37..c6c8125623 100644 --- a/src/p_3dmidtex.cpp +++ b/src/p_3dmidtex.cpp @@ -183,9 +183,11 @@ void P_Attach3dMidtexLinesToSector(sector_t *sector, int lineid, int tag, bool c scrollplane.AttachedLines.Push(&lines[i]); v = int(lines[i].frontsector - sectors); + assert(v < numsectors); found_sectors[v>>3] |= 1 << (v&7); v = int(lines[i].backsector - sectors); + assert(v < numsectors); found_sectors[v>>3] |= 1 << (v&7); } }