diff options
Diffstat (limited to 'src/java/com/healthmarketscience/jackcess/Index.java')
-rw-r--r-- | src/java/com/healthmarketscience/jackcess/Index.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/java/com/healthmarketscience/jackcess/Index.java b/src/java/com/healthmarketscience/jackcess/Index.java index 7c51191..1b3febe 100644 --- a/src/java/com/healthmarketscience/jackcess/Index.java +++ b/src/java/com/healthmarketscience/jackcess/Index.java @@ -60,7 +60,7 @@ public class Index implements Comparable<Index> { private static final byte REVERSE_ORDER_FLAG = (byte)0x01; - private static final Comparator<byte[]> BYTE_CODE_COMPARATOR = + static final Comparator<byte[]> BYTE_CODE_COMPARATOR = new Comparator<byte[]>() { public int compare(byte[] left, byte[] right) { if(left == right) { @@ -79,7 +79,8 @@ public class Index implements Comparable<Index> { ++pos; } if(pos < len) { - return ((left[pos] < right[pos]) ? -1 : 1); + return ((ByteUtil.toUnsignedInt(left[pos]) < + ByteUtil.toUnsignedInt(right[pos])) ? -1 : 1); } return ((left.length < right.length) ? -1 : ((left.length > right.length) ? 1 : 0)); |