aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2012-08-17 19:57:31 +1000
committernyamatongwe <unknown>2012-08-17 19:57:31 +1000
commitce57f0cafcd076db9aaaf70a8d547ac72d011e2f (patch)
treed4d426840abdd0a51c751335806f51e602ee7c8d
parent9b8ff9cfedb49bdfe164990b0e6bb4ebff120446 (diff)
downloadscintilla-mirror-ce57f0cafcd076db9aaaf70a8d547ac72d011e2f.tar.gz
Ensure variable NUL terminated and limit its scope.
Avoids warning from Visual C++ code analysis.
-rw-r--r--lexers/LexLua.cxx2
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;