diff options
author | nyamatongwe <devnull@localhost> | 2013-04-05 17:19:30 +1100 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2013-04-05 17:19:30 +1100 |
commit | f71d19fc8b7a43291e387b0111c32c7dd4507a52 (patch) | |
tree | 8cd247b17109df472e840280168feb2d3db35308 /lexers/LexRuby.cxx | |
parent | b8d5c125b6531fe3113c13fda2ffd2b8c5564600 (diff) | |
download | scintilla-mirror-f71d19fc8b7a43291e387b0111c32c7dd4507a52.tar.gz |
Fix crash in 64-bit builds due to unsigned underflow.
Diffstat (limited to 'lexers/LexRuby.cxx')
-rw-r--r-- | lexers/LexRuby.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lexers/LexRuby.cxx b/lexers/LexRuby.cxx index 40424aabd..ce75ed68d 100644 --- a/lexers/LexRuby.cxx +++ b/lexers/LexRuby.cxx @@ -119,7 +119,7 @@ static int ClassifyWordRb(unsigned int start, unsigned int end, WordList &keywor chAttr = SCE_RB_MODULE_NAME; else if (0 == strcmp(prevWord, "def")) chAttr = SCE_RB_DEFNAME; - else if (keywords.InList(s) && !followsDot(start - 1, styler)) { + else if (keywords.InList(s) && ((start == 0) || !followsDot(start - 1, styler))) { if (keywordIsAmbiguous(s) && keywordIsModifier(s, start, styler)) { |