Fixed
Details
Details
Assignee
Markus Scherer
Markus SchererReporter
Yoshito Umaoka
Yoshito Umaoka(Deactivated)Components
Labels
Priority
Time Needed
Hours
Fix versions
Created June 28, 2018 at 5:21 PM
Updated October 3, 2018 at 10:53 PM
Resolved July 1, 2018 at 8:44 PM
The test code below -
static const UChar testJapaneseName[] = {0x4F50, 0x3005, 0x6728, 0x002C, 0x6B66, 0}; /* Sa sa Ki, Takeshi */ #define KEY_PART_SIZE 16 static void TestNextSortKeyPartJaIdentical(void) { UErrorCode status = U_ZERO_ERROR; UCollator *coll; uint8_t keyPart[KEY_PART_SIZE]; UCharIterator iter; uint32_t state[2] = {0, 0}; int32_t keyPartLen; coll = ucol_open("ja", &status); ucol_setAttribute(coll, UCOL_STRENGTH, UCOL_IDENTICAL, &status); if (U_FAILURE(status)) { log_err_status(status, "ERROR: in creation of Japanese collator with identical strength: %s\n", myErrorName(status)); return; } uiter_setString(&iter, testJapaneseName, 5); keyPartLen = KEY_PART_SIZE; while (keyPartLen == KEY_PART_SIZE) { keyPartLen = ucol_nextSortKeyPart(coll, &iter, state, keyPart, KEY_PART_SIZE, &status); if (U_FAILURE(status)) { log_err_status(status, "ERROR: in iterating next sort key part: %s\n", myErrorName(status)); break; } } ucol_close(coll); }
is failing with U_INDEX_OUTOFBOUNDS_ERROR at the 3rd call of ucol_nextSortKeyPart.