aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2000-06-19 01:43:17 +0000
committernyamatongwe <devnull@localhost>2000-06-19 01:43:17 +0000
commita157abe3fc87d63d650dbeb189f5cd7cf0b8233b (patch)
treeebc1874cef0874a0d152f71c06d4453cfa0e59b8
parent8a45802cf6b1e7dd04e2c492952672e4a4d4d073 (diff)
downloadscintilla-mirror-a157abe3fc87d63d650dbeb189f5cd7cf0b8233b.tar.gz
Fixed hang where only visible char in file is '#'.
-rw-r--r--src/LexCPP.cxx2
1 files changed, 1 insertions, 1 deletions
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);