From a157abe3fc87d63d650dbeb189f5cd7cf0b8233b Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 19 Jun 2000 01:43:17 +0000 Subject: Fixed hang where only visible char in file is '#'. --- src/LexCPP.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx index e6182e8d8..8e3b7c498 100644 --- a/src/LexCPP.cxx +++ b/src/LexCPP.cxx @@ -124,7 +124,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo i++; ch = chNext; chNext = styler.SafeGetCharAt(i + 1); - } while (isspace(ch)); + } while (isspace(ch) && (i < lengthDoc)); } else if (isoperator(ch)) { styler.ColourTo(i-1, state); styler.ColourTo(i, SCE_C_OPERATOR); -- cgit v1.2.3