diff options
-rw-r--r-- | i18npool/source/indexentry/indexentrysupplier_default.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx index 40e06987fbb0..85533ae37e4c 100644 --- a/i18npool/source/indexentry/indexentrysupplier_default.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx @@ -138,7 +138,7 @@ sal_Int16 Index::getIndexWeight(const OUString& rIndexEntry) return mkeys[i]; } } - sal_Unicode code = rIndexEntry[startPos]; + sal_Unicode code = startPos < rIndexEntry.getLength() ? rIndexEntry[startPos] : 0; for (sal_Int16 i = 0; i < table_count; i++) { if (tables[i].start <= code && code <= tables[i].end) return tables[i].table[code-tables[i].start]; |