diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2011-08-21 07:59:22 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2011-08-21 08:04:48 +0200 |
commit | 2fa3cac022c6003b2e3268ad8289a413b2c7c687 (patch) | |
tree | 453bac04566df0060a34ce8a6db7fdbbca866931 | |
parent | eb6621d43753b07d002aaaa8ce1ae22e8d2ab316 (diff) |
check array index *before* using it in array, not *after*
-rw-r--r-- | i18npool/source/breakiterator/gendict.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/i18npool/source/breakiterator/gendict.cxx b/i18npool/source/breakiterator/gendict.cxx index 5c2f38216544..a582cd51bbc5 100644 --- a/i18npool/source/breakiterator/gendict.cxx +++ b/i18npool/source/breakiterator/gendict.cxx @@ -169,7 +169,7 @@ static inline void printIndex2(FILE *source_fp, sal_Int16 *set) for (sal_Int32 j = 0; j < 0x100; j++) { sal_Int32 k = (i<<8) + j; if (prev != 0 ) - while( charArray[k] == 0 && k < 0x10000 ) + while( k < 0x10000 && charArray[k] == 0 ) k++; prev = charArray[(i<<8) + j]; |