diff options
author | Neil <nyamatongwe@gmail.com> | 2018-03-05 16:20:30 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-03-05 16:20:30 +1100 |
commit | 5607148ff787a9bc5ac3f08bbf935f18d89df442 (patch) | |
tree | 8ee798a7ca713eff6a6e49afd5f9fc91c72b63c2 /lexlib/StyleContext.h | |
parent | 26537cf9042a01e80b1b6fa750cfb2ecdc46804b (diff) | |
download | scintilla-mirror-5607148ff787a9bc5ac3f08bbf935f18d89df442.tar.gz |
Bug [#1999]. Fix hang lexing a Lua label where the range ends before "::".
Diffstat (limited to 'lexlib/StyleContext.h')
-rw-r--r-- | lexlib/StyleContext.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lexlib/StyleContext.h b/lexlib/StyleContext.h index a76f7f417..1d40825f4 100644 --- a/lexlib/StyleContext.h +++ b/lexlib/StyleContext.h @@ -131,7 +131,12 @@ public: void ForwardBytes(Sci_Position nb) { const Sci_PositionU forwardPos = currentPos + nb; while (forwardPos > currentPos) { + const Sci_PositionU currentPosStart = currentPos; Forward(); + if (currentPos == currentPosStart) { + // Reached end + return; + } } } void ChangeState(int state_) { |