aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexRuby.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2013-04-05 17:19:30 +1100
committernyamatongwe <unknown>2013-04-05 17:19:30 +1100
commit8cdd9b7678b928610b7cd422eca196463d0cb138 (patch)
tree5663aa46c8520ddd880839170a3ecd5b183b9e2f /lexers/LexRuby.cxx
parent8d4bcadddaf9d32d0bd1987c62e5c01ab557e38e (diff)
downloadscintilla-mirror-8cdd9b7678b928610b7cd422eca196463d0cb138.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)) {