Skip to content

Commit a0503fb

Browse files
authored
Fix typo in VectorSliceBuilder#consider
1 parent 2cb0957 commit a0503fb

File tree

1 file changed

+1
-1
lines changed
  • Common/src/main/java/at/petrak/hexcasting/api/utils

1 file changed

+1
-1
lines changed

Common/src/main/java/at/petrak/hexcasting/api/utils/Vector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2332,7 +2332,7 @@ public VectorSliceBuilder(int lo, int hi) {
23322332
public <T> void consider(int n, T[] a) {
23332333
final int count = a.length * (1 << (BITS * (n - 1)));
23342334
final int lo0 = Math.max(this.lo - this.pos, 0);
2335-
final int hi0 = Math.max(this.hi - this.pos, count);
2335+
final int hi0 = Math.min(this.hi - this.pos, count);
23362336
if(hi0 > lo0) {
23372337
this.addSlice(n, a, lo0, hi0);
23382338
this.len += (hi0 - lo0);

0 commit comments

Comments
 (0)