diff options
author | nyamatongwe <devnull@localhost> | 2010-01-19 02:42:00 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2010-01-19 02:42:00 +0000 |
commit | c176f590a949df711b001ea271eb341f70977ed4 (patch) | |
tree | 7f77f202bcab3d5d2898dd20cca0bd56939c255b /src | |
parent | b68ad6ba5a145bbce33bff620e4bdb31925e8d82 (diff) | |
download | scintilla-mirror-c176f590a949df711b001ea271eb341f70977ed4.tar.gz |
Avoid warning from cppcheck about not ensuring NUL termination after
strncpy.
Diffstat (limited to 'src')
-rw-r--r-- | src/ExternalLexer.h | 1 |
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, |