summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
Diffstat (limited to 'ucb')
-rw-r--r--ucb/source/sorter/sortresult.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index d5fcabf5069e..c4cec6ea031f 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -1286,7 +1286,7 @@ sal_IntPtr SortedResultSet::FindPos( SortListData *pEntry,
nCompare = Compare( pEntry, pMid );
if ( !nCompare )
- nCompare = reinterpret_cast<sal_IntPtr>(pEntry) - reinterpret_cast<sal_IntPtr>(pMid);
+ nCompare = (pEntry != pMid) ? ((pEntry < pMid) ? -1 : 1) : 0;
if ( nCompare < 0 ) // pEntry < pMid
nEnd = nMid - 1;