diff --git a/firmwares/xybot/xybot.ino b/firmwares/xybot/xybot.ino index dc4535c..318a8da 100644 --- a/firmwares/xybot/xybot.ino +++ b/firmwares/xybot/xybot.ino @@ -217,6 +217,7 @@ void parseCordinate(char * cmd) tarY = curY; while(str!=NULL){ str = strtok_r(0, " ", &tmp); + if (str==NULL) break; if(str[0]=='X'){ tarX = atof(str+1); }else if(str[0]=='Y'){