diff options
author | nyamatongwe <devnull@localhost> | 2012-08-17 19:57:31 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2012-08-17 19:57:31 +1000 |
commit | d24f3b5a95033b43d19c690da66d7070350edd60 (patch) | |
tree | b1ee8784d5f295f53ca831ba38d1913649fa1372 | |
parent | e70256f3659b8534dfbef24cd00c3957b9a2dd8d (diff) | |
download | scintilla-mirror-d24f3b5a95033b43d19c690da66d7070350edd60.tar.gz |
Ensure variable NUL terminated and limit its scope.
Avoids warning from Visual C++ code analysis.
-rw-r--r-- | lexers/LexLua.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lexers/LexLua.cxx b/lexers/LexLua.cxx index 9e48efcd9..4277d87a5 100644 --- a/lexers/LexLua.cxx +++ b/lexers/LexLua.cxx @@ -374,7 +374,6 @@ static void FoldLuaDoc(unsigned int startPos, int length, int /* initStyle */, W char chNext = styler[startPos]; bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; int styleNext = styler.StyleAt(startPos); - char s[10]; for (unsigned int i = startPos; i < lengthDoc; i++) { char ch = chNext; @@ -384,6 +383,7 @@ static void FoldLuaDoc(unsigned int startPos, int length, int /* initStyle */, W bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n'); if (style == SCE_LUA_WORD) { if (ch == 'i' || ch == 'd' || ch == 'f' || ch == 'e' || ch == 'r' || ch == 'u') { + char s[10] = ""; for (unsigned int j = 0; j < 8; j++) { if (!iswordchar(styler[i + j])) { break; |