mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fixed ArrayOutOfBounds on binarySearch of empty list. https://github.com/konsoletyper/teavm/issues/110
This commit is contained in:
parent
3564230cf3
commit
7eb710a806
|
@ -253,6 +253,9 @@ public class TCollections extends TObject {
|
|||
}
|
||||
int l = 0;
|
||||
int u = list.size() - 1;
|
||||
if (u < 0) {
|
||||
return -1;
|
||||
}
|
||||
while (true) {
|
||||
int i = (l + u) / 2;
|
||||
T e = list.get(i);
|
||||
|
|
Loading…
Reference in New Issue
Block a user