Fixed issue where whitespace broke ACKd messages

This commit is contained in:
Jordan Sherer 2018-10-17 14:36:15 -04:00
parent 80d798d7e3
commit 8bba574963

View File

@ -8418,10 +8418,12 @@ void MainWindow::processBufferedActivity() {
int checksumSize = Varicode::isCommandChecksumed(buffer.cmd.cmd); int checksumSize = Varicode::isCommandChecksumed(buffer.cmd.cmd);
if(checksumSize == 32) { if(checksumSize == 32) {
message = Varicode::lstrip(message);
checksum = message.right(6); checksum = message.right(6);
message = message.left(message.length() - 7); message = message.left(message.length() - 7);
valid = Varicode::checksum32Valid(checksum, message); valid = Varicode::checksum32Valid(checksum, message);
} else if(checksumSize == 16) { } else if(checksumSize == 16) {
message = Varicode::lstrip(message);
checksum = message.right(3); checksum = message.right(3);
message = message.left(message.length() - 4); message = message.left(message.length() - 4);
valid = Varicode::checksum16Valid(checksum, message); valid = Varicode::checksum16Valid(checksum, message);