mirror of
https://github.com/maxkratz/fastutil.git
synced 2024-09-16 11:58:09 +00:00
Update ImmutableList.drv
This commit is contained in:
parent
9920128c20
commit
1887508645
1 changed files with 2 additions and 2 deletions
|
@ -339,7 +339,7 @@ public class IMMUTABLE_LIST KEY_GENERIC extends LISTS.ImmutableListBase KEY_GENE
|
|||
@Override
|
||||
public int back(int n) {
|
||||
if (n < 0) throw new IllegalArgumentException("Argument must be nonnegative: " + n);
|
||||
final int remaining = a.length - pos;
|
||||
final int remaining = pos;
|
||||
if (n < remaining) {
|
||||
pos -= n;
|
||||
} else {
|
||||
|
@ -573,7 +573,7 @@ public class IMMUTABLE_LIST KEY_GENERIC extends LISTS.ImmutableListBase KEY_GENE
|
|||
@Override
|
||||
public int back(int n) {
|
||||
if (n < 0) throw new IllegalArgumentException("Argument must be nonnegative: " + n);
|
||||
final int remaining = to - pos;
|
||||
final int remaining = pos - from;
|
||||
if (n < remaining) {
|
||||
pos -= n;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue