diff options
| -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; | 
