array address is only MAX_ADDRESS wide

This commit is contained in:
David Tardon 2011-05-14 14:29:43 +02:00
parent bc64f51196
commit c2a48ac46e

View file

@ -79,7 +79,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
sal_Int32 nPos=0;
sal_uInt32 nChar = Ostr.iterateCodePoints(&nPos, 2);
if (nChar > MAX_ADDRESS) {
if (nChar >= MAX_ADDRESS) {
printf("Code point 0x%lx exceeds MAX_ADDRESS 0x%x, Please increase MAX_ADDRESS", static_cast<long unsigned int>(nChar), MAX_ADDRESS);
exit(1);
}