Skip to content

Commit

Permalink
set available bytes before erasing the read size
Browse files Browse the repository at this point in the history
  • Loading branch information
bgola authored and patrickdupuis committed Jun 14, 2020
1 parent 87fcd73 commit 52737d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion editors/sc-ide/core/sc_process.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,8 @@ void ScProcess::onIpcData() {
if (mReadSize > 0 && avail >= mReadSize) {
QByteArray baReceived(mIpcData.left(mReadSize));
mIpcData.remove(0, mReadSize);
mReadSize = 0;
avail -= mReadSize;
mReadSize = 0;

QDataStream in(baReceived);
in.setVersion(QDataStream::Qt_4_6);
Expand Down

0 comments on commit 52737d6

Please sign in to comment.