aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexlib/WordList.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'lexlib/WordList.cxx')
-rw-r--r--lexlib/WordList.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/lexlib/WordList.cxx b/lexlib/WordList.cxx
index e789c0eaf..10b6fe349 100644
--- a/lexlib/WordList.cxx
+++ b/lexlib/WordList.cxx
@@ -13,6 +13,7 @@
#include <algorithm>
+#include "StringCopy.h"
#include "WordList.h"
#ifdef SCI_NAMESPACE
@@ -131,7 +132,7 @@ void WordList::Set(const char *s) {
#else
SortWordList(words, len);
#endif
- for (unsigned int k = 0; k < (sizeof(starts) / sizeof(starts[0])); k++)
+ for (unsigned int k = 0; k < ELEMENTS(starts); k++)
starts[k] = -1;
for (int l = len - 1; l >= 0; l--) {
unsigned char indexChar = words[l][0];