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 15:25:56 +0300
committerDavid Crocker <dcrocker@eschertech.com>2020-11-26 15:25:56 +0300
commitb404631194a4b6054f6b02c94d72a847610b59e6 (patch)
tree96690be4ed8d9d41a9613eb2da1ba5351771c36e /src/GCodes/GCodeBuffer/StringParser.cpp
parentfae8858eae98ffdd668dfc7ad8b007bf91dd8b08 (diff)
Avoid reporting very large file positions when the print file has just
been completed
Diffstat (limited to 'src/GCodes/GCodeBuffer/StringParser.cpp')
-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 147f17b2..ea395077 100644
--- a/src/GCodes/GCodeBuffer/StringParser.cpp
+++ b/src/GCodes/GCodeBuffer/StringParser.cpp
@@ -36,7 +36,7 @@ StringParser::StringParser(GCodeBuffer& gcodeBuffer) noexcept
void StringParser::Init() noexcept
{
gcodeLineEnd = 0;
- commandLength = 0;
+ commandStart = commandLength = 0; // set both to zero so that calls to GetFilePosition don't return negative values
readPointer = -1;
hadLineNumber = hadChecksum = overflowed = seenExpression = false;
computedChecksum = 0;