mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- fixed OOB write in section splitting code.
This commit is contained in:
parent
a9d7eb06c7
commit
c2f29b8849
1 changed files with 12 additions and 6 deletions
|
@ -140,9 +140,12 @@ static void SplitSection(int section, int start, int end)
|
|||
assert(newline.point2index >= 0);
|
||||
|
||||
// relink the partner
|
||||
auto& partnerline = sectionLines[newline.partner];
|
||||
partnerline.partner = thisline;
|
||||
partnerline.partnersection = newline.section;
|
||||
if (newline.partner >= 0)
|
||||
{
|
||||
auto& partnerline = sectionLines[newline.partner];
|
||||
partnerline.partner = thisline;
|
||||
partnerline.partnersection = newline.section;
|
||||
}
|
||||
thisline++;
|
||||
}
|
||||
else
|
||||
|
@ -172,9 +175,12 @@ static void SplitSection(int section, int start, int end)
|
|||
assert(newline.point2index >= 0);
|
||||
|
||||
// relink the partner
|
||||
auto& partnerline = sectionLines[newline.partner];
|
||||
partnerline.partner = thisline;
|
||||
partnerline.partnersection = newline.section;
|
||||
if (newline.partner >= 0)
|
||||
{
|
||||
auto& partnerline = sectionLines[newline.partner];
|
||||
partnerline.partner = thisline;
|
||||
partnerline.partnersection = newline.section;
|
||||
}
|
||||
thisline++;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue