mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Don't allow partial commands
This commit is contained in:
1 parent
34d46aa29a
commit
e92b4a2358
1 file changed
+1
-1
+1
-1
@@ -103,7 +103,7 @@ uint8_t cmd_compare(uint8_t start, uint8_t * __code cmd)
|
||||
}
|
||||
// write_char('.'); print_byte(i); write_char(':'); print_byte(j); write_char(','); print_byte (cmd[j-1]);
|
||||
// write_char(','); print_byte(cmd[j]);
|
||||
if (i == cmd_words_b[start + 1] || (cmd_buffer[i] == ' ' && !cmd[j]))
|
||||
if ( ((i == cmd_words_b[start + 1]) || (cmd_buffer[i] == ' ')) && !cmd[j]) // next word reached and command fully matched
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user