Updated compareTo method

X-SVN-Rev: 3991
This commit is contained in:
Syn Wee Quek 2001-03-09 02:18:20 +00:00
parent 4c20fd42ed
commit 04bee678e7

View File

@ -234,13 +234,14 @@ CollationKey::compareTo(const CollationKey& target) const
}
if (minLength > 0) {
uint8_t diff = uprv_memcmp(src, tgt, minLength * sizeof(UChar));
int diff = uprv_memcmp(src, tgt, minLength);
if (diff > 0) {
return Collator::GREATER;
}
else
if (diff < 0)
if (diff < 0) {
return Collator::LESS;
}
}
return result;