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:
authorDavid Crocker <dcrocker@eschertech.com>2020-11-26 12:54:48 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-11-26 12:54:48 +0300
commit9ea8c5a4b6bd97e75ed8fc8ff08cd113bad7633f (patch)
treedf7c20c9b37695de0a7fa68912271e225db5fcc6 /src/GCodes/GCodeBuffer
parentdee33fbcfb0b3677eda871b61d22a4ed6a34e1ae (diff)
File missed from previous commit
Diffstat (limited to 'src/GCodes/GCodeBuffer')
-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.