From 08ed7667711e211aeaa4d7424bad0aa2f08fd5d8 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Mon, 24 Feb 2020 02:02:08 +1100 Subject: [PATCH] audiorenderworker: fixed potential false positive in assert --- app/render/backend/audiorenderworker.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/render/backend/audiorenderworker.cpp b/app/render/backend/audiorenderworker.cpp index f6c45c15c..e97cb23af 100644 --- a/app/render/backend/audiorenderworker.cpp +++ b/app/render/backend/audiorenderworker.cpp @@ -82,9 +82,7 @@ NodeValueTable AudioRenderWorker::RenderBlock(const TrackOutput *track, const Ti int actual_copy_size = qMin(audio_params_.time_to_bytes(range_for_block.length()), samples_from_this_block.size()); if (destination_offset < 0 - || destination_offset + actual_copy_size < 0 - || destination_offset >= block_range_buffer.size() - || destination_offset + actual_copy_size >= block_range_buffer.size()) { + || destination_offset + actual_copy_size > block_range_buffer.size()) { qCritical() << "Tried to copy audio beyond the size of the destination buffer"; qCritical() << " Destination size:" << block_range_buffer.size(); qCritical() << " Destination offset:" << destination_offset;