aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib/WordList.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2017-04-18 12:48:41 +1000
committerNeil <nyamatongwe@gmail.com>2017-04-18 12:48:41 +1000
commit98cbbdd0107bb11d202be6389590e945cd5e5b5a (patch)
tree87b0635a128eefc9854f17053ba119210634d2ca /lexlib/WordList.cxx
parente06e7c881753caff472550cf744d5ce10594fe9f (diff)
downloadscintilla-mirror-98cbbdd0107bb11d202be6389590e945cd5e5b5a.tar.gz
Add an assert to avoid a warning from Visual C++ Code Analysis.
Diffstat (limited to 'lexlib/WordList.cxx')
-rw-r--r--lexlib/WordList.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/lexlib/WordList.cxx b/lexlib/WordList.cxx
index 895fdf7dc..1780a1ccf 100644
--- a/lexlib/WordList.cxx
+++ b/lexlib/WordList.cxx
@@ -6,6 +6,7 @@
// The License.txt file describes the conditions under which this software may be distributed.
#include <cstdlib>
+#include <cassert>
#include <cstring>
#include <algorithm>
@@ -56,6 +57,7 @@ static char **ArrayFromWordList(char *wordlist, int *len, bool onlyLineEnds = fa
prev = wordlist[k];
}
}
+ assert(wordsStore < (words + 1));
keywords[wordsStore] = &wordlist[slen];
*len = wordsStore;
return keywords;