diff options
author | nyamatongwe <unknown> | 2001-05-31 01:44:26 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2001-05-31 01:44:26 +0000 |
commit | 4ac13a68c8541421d03fc1bd203671a1e6dc7f10 (patch) | |
tree | 7f0e56d7510226a9a17a425a018a0b62a7300bcb /src | |
parent | 2051a19ac20aa2a986534d08ead64e1292a02b5d (diff) | |
download | scintilla-mirror-4ac13a68c8541421d03fc1bd203671a1e6dc7f10.tar.gz |
Using explicit set of whitespace characters to avoid calling isspace
with value that may be out of allowed range.
Diffstat (limited to 'src')
-rw-r--r-- | src/DocumentAccessor.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/DocumentAccessor.cxx b/src/DocumentAccessor.cxx index 4cb90c3e4..c187f2a44 100644 --- a/src/DocumentAccessor.cxx +++ b/src/DocumentAccessor.cxx @@ -170,7 +170,8 @@ int DocumentAccessor::IndentAmount(int line, int *flags, PFNIsCommentLeader pfnI *flags = spaceFlags; indent += SC_FOLDLEVELBASE; // if completely empty line or the start of a comment... - if (isspace(ch) || (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) ) + if ((ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r') || + (pfnIsCommentLeader && (*pfnIsCommentLeader)(*this, pos, end-pos)) ) return indent | SC_FOLDLEVELWHITEFLAG; else return indent; |