Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/GCodes/GCodeBuffer/StringParser.cpp2
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.