diff --git a/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp b/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp index 91a505d4..071183a1 100644 --- a/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp +++ b/plugins/Kaleidoscope-FocusSerial/src/kaleidoscope/plugin/FocusSerial.cpp @@ -40,7 +40,9 @@ EventHandlerResult FocusSerial::afterEachCycle() { if (Runtime.serialPort().peek() == '\n') break; } while (command_[i - 1] != ' ' && i < 32); - if (command_[i - 1] == ' ') + + // If this was a command with a space-delimited payload, strip the space delimiter off + if (command_[i - 1] == SEPARATOR ) command_[i - 1] = '\0'; Runtime.onFocusEvent(command_);