Skip to content

Commit c800c1c

Browse files
committed
Prevent crash in FileScrubber
1 parent 6fc3876 commit c800c1c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

Source/Processors/FileReader/FileReader.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,10 @@ void FileReader::readAndFillBufferCache(HeapBlock<int16> &cacheBuffer)
641641
// should only loop if reached end of file and resuming from start
642642
while (samplesRead < samplesNeeded)
643643
{
644+
645+
if (samplesRead < 0)
646+
return;
647+
644648
int samplesToRead = samplesNeeded - samplesRead;
645649

646650
// if reached end of file stream

0 commit comments

Comments
 (0)