aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2010-01-19 02:42:00 +0000
committernyamatongwe <devnull@localhost>2010-01-19 02:42:00 +0000
commitc176f590a949df711b001ea271eb341f70977ed4 (patch)
tree7f77f202bcab3d5d2898dd20cca0bd56939c255b
parentb68ad6ba5a145bbce33bff620e4bdb31925e8d82 (diff)
downloadscintilla-mirror-c176f590a949df711b001ea271eb341f70977ed4.tar.gz
Avoid warning from cppcheck about not ensuring NUL termination after
strncpy.
-rw-r--r--src/ExternalLexer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ExternalLexer.h b/src/ExternalLexer.h
index 3c1659a55..29f42ccf7 100644
--- a/src/ExternalLexer.h
+++ b/src/ExternalLexer.h
@@ -40,6 +40,7 @@ public:
ExternalLexerModule(int language_, LexerFunction fnLexer_,
const char *languageName_=0, LexerFunction fnFolder_=0) : LexerModule(language_, fnLexer_, 0, fnFolder_){
strncpy(name, languageName_, sizeof(name));
+ name[sizeof(name)-1] = '\0';
languageName = name;
};
virtual void Lex(unsigned int startPos, int lengthDoc, int initStyle,