aboutsummaryrefslogtreecommitdiff
path: root/source/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/main.cpp')
-rw-r--r--source/main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/main.cpp b/source/main.cpp
index dde5175..5ba9eb5 100644
--- a/source/main.cpp
+++ b/source/main.cpp
@@ -58,7 +58,7 @@ void onConnected(MicroBitEvent) {
int startI = 1;
for (int i = 1; i < length; i++) {
cChar = command[i];
- if (cChar == 'R' || cChar == 'T' || cChar == 'A' || cChar == 'S' || cChar == ':') {
+ if (cChar == 'R' || cChar == 'T' || cChar == 'A' || cChar == 'S' || i >= length-1) {
int valLength = i - startI;
char val[valLength];
for (int o = 0; o < valLength; o++) {