mirror of
https://github.com/collinsmith/riiablo.git
synced 2025-07-04 15:27:30 +07:00
Added terminator for MPQ#getIndex(long,int,short) for case where not found
This commit is contained in:
@ -268,7 +268,7 @@ public final class MPQ {
|
||||
searches++;
|
||||
int bestId = -1;
|
||||
final Entry[] table = this.table;
|
||||
for (int i = offset & (table.length - 1);; i++, misses++) {
|
||||
for (int i = offset & (table.length - 1), s = table.length; i < s; i++, misses++) {
|
||||
final Entry entry = table[i];
|
||||
if (entry.block == Entry.BLOCK_UNUSED) {
|
||||
return bestId;
|
||||
@ -282,6 +282,8 @@ public final class MPQ {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return bestId;
|
||||
}
|
||||
|
||||
Entry getEntry(final long key, final int offset, final short locale) {
|
||||
|
Reference in New Issue
Block a user