Skip to content

Commit 716531c

Browse files
committed
qt: Clear read buffer before usage
1 parent cb06a2d commit 716531c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

qt/programmer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ void Programmer::readChipId(std::function<void(ChipId)> callback)
196196
{
197197
Cmd cmd = { .code = CMD_NAND_READ_ID };
198198

199+
readData.clear();
199200
serialPortReader->read(std::bind(&Programmer::readRespChipIdCb, this,
200201
std::placeholders::_1), &readData);
201202

0 commit comments

Comments
 (0)