mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-25 05:31:00 +00:00
- Fixed: FCoverageBuffer::InsertSpan() failed to consider the case where the new span starts above
an existing span and ends below it. SVN r3726 (trunk)
This commit is contained in:
parent
e61f08478d
commit
8f39e692e7
1 changed files with 6 additions and 1 deletions
|
@ -2610,7 +2610,7 @@ void FCoverageBuffer::InsertSpan(int listnum, int start, int stop)
|
||||||
{ // The existing span completely covers this one. // +++++
|
{ // The existing span completely covers this one. // +++++
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Extend the existing span with the new one. // ======
|
extend: // Extend the existing span with the new one. // ======
|
||||||
span = *span_p; // +++++++
|
span = *span_p; // +++++++
|
||||||
span->Stop = stop; // (or) +++++
|
span->Stop = stop; // (or) +++++
|
||||||
|
|
||||||
|
@ -2638,6 +2638,11 @@ void FCoverageBuffer::InsertSpan(int listnum, int start, int stop)
|
||||||
{ // The new span extends the existing span from // ++++
|
{ // The new span extends the existing span from // ++++
|
||||||
// the beginning. // (or) ++++
|
// the beginning. // (or) ++++
|
||||||
(*span_p)->Start = start;
|
(*span_p)->Start = start;
|
||||||
|
if ((*span_p)->Stop < stop)
|
||||||
|
{ // The new span also extends the existing span // ======
|
||||||
|
// at the bottom // ++++++++++++++
|
||||||
|
goto extend;
|
||||||
|
}
|
||||||
goto check;
|
goto check;
|
||||||
}
|
}
|
||||||
else // ======
|
else // ======
|
||||||
|
|
Loading…
Reference in a new issue