mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fix for OOB issue in mActiveChildQueues
This commit is contained in:
parent
d67a6243eb
commit
70bb55d779
1 changed files with 2 additions and 2 deletions
|
@ -225,11 +225,11 @@ void BfPrinter::FlushVisitChild()
|
||||||
while (childQueueState.mIdx < childQueueState.mQueue->mSize)
|
while (childQueueState.mIdx < childQueueState.mQueue->mSize)
|
||||||
{
|
{
|
||||||
auto node = (*childQueueState.mQueue)[childQueueState.mIdx++];
|
auto node = (*childQueueState.mQueue)[childQueueState.mIdx++];
|
||||||
if (mActiveChildQueues.mSize > 1)
|
if (mActiveChildQueues.mSize >= 2)
|
||||||
{
|
{
|
||||||
// Check for nodes in the prev queue that are actual inside the new queue (can happen with inline type declarations)
|
// Check for nodes in the prev queue that are actual inside the new queue (can happen with inline type declarations)
|
||||||
auto prevQueue = mActiveChildQueues[mActiveChildQueues.mSize - 2];
|
auto prevQueue = mActiveChildQueues[mActiveChildQueues.mSize - 2];
|
||||||
while (true)
|
while (prevQueue->mIdx < prevQueue->mQueue->mSize)
|
||||||
{
|
{
|
||||||
auto prevQueueNode = (*prevQueue->mQueue)[prevQueue->mIdx];
|
auto prevQueueNode = (*prevQueue->mQueue)[prevQueue->mIdx];
|
||||||
if (prevQueueNode.mQueuedNode->mSrcStart >= node.mQueuedNode->mSrcStart)
|
if (prevQueueNode.mQueuedNode->mSrcStart >= node.mQueuedNode->mSrcStart)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue