aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexRuby.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2013-04-05 17:19:30 +1100
committernyamatongwe <devnull@localhost>2013-04-05 17:19:30 +1100
commitf71d19fc8b7a43291e387b0111c32c7dd4507a52 (patch)
tree8cd247b17109df472e840280168feb2d3db35308 /lexers/LexRuby.cxx
parentb8d5c125b6531fe3113c13fda2ffd2b8c5564600 (diff)
downloadscintilla-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.cxx2
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)) {