diff options
| author | Neil <nyamatongwe@gmail.com> | 2017-04-18 12:48:41 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2017-04-18 12:48:41 +1000 | 
| commit | 98cbbdd0107bb11d202be6389590e945cd5e5b5a (patch) | |
| tree | 87b0635a128eefc9854f17053ba119210634d2ca | |
| parent | e06e7c881753caff472550cf744d5ce10594fe9f (diff) | |
| download | scintilla-mirror-98cbbdd0107bb11d202be6389590e945cd5e5b5a.tar.gz | |
Add an assert to avoid a warning from Visual C++ Code Analysis.
| -rw-r--r-- | lexlib/WordList.cxx | 2 | 
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;  | 
