From 8cdd9b7678b928610b7cd422eca196463d0cb138 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 5 Apr 2013 17:19:30 +1100 Subject: Fix crash in 64-bit builds due to unsigned underflow. --- lexers/LexRuby.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) { -- cgit v1.2.3