diff --git a/src/binarystreamreader.cpp b/src/binarystreamreader.cpp --- a/src/binarystreamreader.cpp +++ b/src/binarystreamreader.cpp @@ -1,5 +1,5 @@ /* - Copyright © 2017 Hasan Yavuz Özderya + Copyright © 2018 Hasan Yavuz Özderya This file is part of serialplot. @@ -145,7 +145,7 @@ void BinaryStreamReader::onDataReady() { _device->read(sampleSize); skipSampleRequested = false; - bytesAvailable--; + bytesAvailable -= sampleSize; } if (bytesAvailable < packageSize) return;