From 40bfefcee9b276da9589d02ae6abd8412a065d7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Enrico=20Tr=C3=B6ger?= Date: Sun, 23 Apr 2006 12:29:43 +0000 Subject: [PATCH] fixed crash when typing "\" as last character in a bash file (patch from Scintilla ML) git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@265 ea778897-0a13-0410-b9d1-a72fbfd435f5 --- scintilla/LexBash.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scintilla/LexBash.cxx b/scintilla/LexBash.cxx index 903d793b..f05c9b38 100644 --- a/scintilla/LexBash.cxx +++ b/scintilla/LexBash.cxx @@ -258,7 +258,8 @@ static void ColouriseBashDoc(unsigned int startPos, int length, int initStyle, if (state == SCE_SH_DEFAULT) { if (ch == '\\') { // escaped character - i++; + if (i < lengthDoc - 1) + i++; ch = chNext; chNext = chNext2; styler.ColourTo(i, SCE_SH_IDENTIFIER);