Fix btree keys not being properly compared
This commit is contained in:
parent
0b163481e7
commit
8d8d4029a7
@ -30,9 +30,9 @@ private operator fun ByteArray.compareTo(b: ByteArray): Int {
|
||||
require(size == b.size) { "Keys are not of same size (${size} vs ${b.size})" }
|
||||
|
||||
for (i in indices) {
|
||||
if (this[i] > b[i]) {
|
||||
if (this[i].toInt() and 0xFF > b[i].toInt() and 0xFF) {
|
||||
return 1
|
||||
} else if (this[i] < b[i]) {
|
||||
} else if (this[i].toInt() and 0xFF < b[i].toInt() and 0xFF) {
|
||||
return -1
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user