diff options
-rw-r--r-- | src/GCodes/GCodeBuffer/StringParser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/GCodes/GCodeBuffer/StringParser.cpp b/src/GCodes/GCodeBuffer/StringParser.cpp index 586b4c3d..147f17b2 100644 --- a/src/GCodes/GCodeBuffer/StringParser.cpp +++ b/src/GCodes/GCodeBuffer/StringParser.cpp @@ -897,7 +897,7 @@ size_t StringParser::DataLength() const noexcept // Return true if the command being processed is the last one in this line of GCode bool StringParser::IsLastCommand() const noexcept { - return commandEnd == gcodeLineEnd; + return commandEnd >= gcodeLineEnd; // using >= here also covers the case where the buffer is empty and gcodeLineEnd has been set to zero } // Is 'c' in the G Code string? 'c' must be uppercase. |