mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- added missing range check to section code.
Fixes asserts on some maps in Kama Sutra.
This commit is contained in:
parent
6444a7535c
commit
ea0da8533c
1 changed files with 1 additions and 0 deletions
|
@ -141,6 +141,7 @@ public:
|
|||
}
|
||||
TArrayView<FSection> SectionsForSector(int sindex)
|
||||
{
|
||||
if (numberOfSectionForSectorPtr[sindex] == 0) return TArrayView<FSection>(nullptr);
|
||||
return sindex < 0 ? TArrayView<FSection>(0) : TArrayView<FSection>(&allSections[firstSectionForSectorPtr[sindex]], numberOfSectionForSectorPtr[sindex]);
|
||||
}
|
||||
int SectionIndex(const FSection *sect)
|
||||
|
|
Loading…
Reference in a new issue