From 98cbbdd0107bb11d202be6389590e945cd5e5b5a Mon Sep 17 00:00:00 2001 From: Neil Date: Tue, 18 Apr 2017 12:48:41 +1000 Subject: Add an assert to avoid a warning from Visual C++ Code Analysis. --- lexlib/WordList.cxx | 2 ++ 1 file changed, 2 insertions(+) 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 +#include #include #include @@ -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; -- cgit v1.2.3