diff --git a/cube/User/Src/cmdHandler.c b/cube/User/Src/cmdHandler.c index a4626d3..86c4ae0 100644 --- a/cube/User/Src/cmdHandler.c +++ b/cube/User/Src/cmdHandler.c @@ -113,6 +113,9 @@ int8_t cmdExecuteCommand(uint8_t *cmdLine, bool resetConfigMode) { args[argc++] = strtok(inCmdLine, " "); inCmdLine = NULL; } while (args[argc - 1] != NULL); + if (argc > 0) { + argc--; + } char *cmd = args[0]; int8_t retCode = 0;