aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2000-06-19 01:43:17 +0000
committernyamatongwe <unknown>2000-06-19 01:43:17 +0000
commite52a59935e9824e59a2b402e035365f22ff10152 (patch)
treeebc1874cef0874a0d152f71c06d4453cfa0e59b8 /src
parentdcf3966d245a9a79ceb7f49ace2892f6c5e8bb8d (diff)
downloadscintilla-mirror-e52a59935e9824e59a2b402e035365f22ff10152.tar.gz
Fixed hang where only visible char in file is '#'.
Diffstat (limited to 'src')
-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);