mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-11 05:01:09 +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)
|
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]);
|
return sindex < 0 ? TArrayView<FSection>(0) : TArrayView<FSection>(&allSections[firstSectionForSectorPtr[sindex]], numberOfSectionForSectorPtr[sindex]);
|
||||||
}
|
}
|
||||||
int SectionIndex(const FSection *sect)
|
int SectionIndex(const FSection *sect)
|
||||||
|
|
Loading…
Reference in a new issue