ICU-5821 Try out a fix for i5/OS.

X-SVN-Rev: 22261
This commit is contained in:
George Rhoten 2007-08-03 20:18:37 +00:00
parent efe2014ed1
commit 4e7d2abfe5

View File

@ -948,16 +948,17 @@ void RBBITableBuilder::setAdd(UVector *dest, UVector *source) {
dest->setSize(sourceSize+destOriginalSize);
while (sourceBuff < sourceLim && destBuff < destLim) {
if (*destBuff < *sourceBuff) {
dest->setElementAt(*destBuff++, di++);
}
else if (*sourceBuff < *destBuff) {
dest->setElementAt(*sourceBuff++, di++);
}
else {
if (*destBuff == *sourceBuff) {
dest->setElementAt(*sourceBuff++, di++);
destBuff++;
}
// This check may not work on machines with segmented memory, like i5/OS.
else if (*destBuff < *sourceBuff) {
dest->setElementAt(*destBuff++, di++);
}
else { /* *sourceBuff < *destBuff */
dest->setElementAt(*sourceBuff++, di++);
}
}
// At most one of these two cleanup loops will execute