diff options
author | David Crocker <dcrocker@eschertech.com> | 2022-10-11 20:13:19 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2022-10-11 20:13:19 +0300 |
commit | 6a89f63937679797e572807108e9b29245ced400 (patch) | |
tree | 2f8c0082c0acf8502a92183ec0a738f451e4005b | |
parent | a7e81b4692c9c802d62906d12b1e2c3597d9f949 (diff) |
Fixed BinaryParser::SeenAny for lowercase parameters
-rw-r--r-- | src/GCodes/GCodeBuffer/BinaryParser.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/GCodes/GCodeBuffer/BinaryParser.cpp b/src/GCodes/GCodeBuffer/BinaryParser.cpp index 9c6f9d8f..b4508158 100644 --- a/src/GCodes/GCodeBuffer/BinaryParser.cpp +++ b/src/GCodes/GCodeBuffer/BinaryParser.cpp @@ -98,7 +98,14 @@ bool BinaryParser::SeenAny(Bitmap<uint32_t> bm) const noexcept { const CodeParameter *param = reinterpret_cast<const CodeParameter*>(parameterStart + i * sizeof(CodeParameter)); const char paramLetter = param->letter; - if (paramLetter >= 'A' && paramLetter <= 'Z' && bm.IsBitSet(paramLetter - 'A')) + if (paramLetter >= 'A' && paramLetter <= 'Z') + { + if (bm.IsBitSet(paramLetter - 'A')) + { + return true; + } + } + else if (paramLetter >= 'a' && paramLetter <= 'f' && bm.IsBitSet(paramLetter - ('a' - 26))) { return true; } |