- // if so, see which decompositions match
- for(j = 0, cp = end+1; cp <= end || uset_getSerializedRange(&starts, j++, &cp, &end); ++cp) {
- //Hashtable *remainder = extract(cp, segment, segLen, i, status);
- Hashtable *remainder = extract(cp, segment, segLen, i, status);
- if (remainder == NULL) continue;
+ // if so, see which decompositions match
+ UnicodeSetIterator iter(starts);
+ while (iter.next()) {
+ UChar32 cp2 = iter.getCodepoint();
+ Hashtable remainder(status);
+ remainder.setValueDeleter(uprv_deleteUObject);
+ if (extract(&remainder, cp2, segment, segLen, i, status) == NULL) {
+ continue;
+ }