diff --git a/pttyhandler.cpp b/pttyhandler.cpp index 0bdc79a..740cd46 100644 --- a/pttyhandler.cpp +++ b/pttyhandler.cpp @@ -155,7 +155,7 @@ void pttyHandler::sendDataOut(const QByteArray& writeData) qint64 bytesWritten=0; - if ((unsigned char)inPortData[2] != 0xE1 && (unsigned char)inPortData[3] != 0xE1) { + if (writeData[2] != (char)0xE1 || writeData[3] != (char)0xE1) { bytesWritten = port->write(writeData); if (bytesWritten != writeData.length()) { qDebug(logSerial()) << "bytesWritten: " << bytesWritten << " length of byte array: " << writeData.length()\