Skip to content

Commit

Permalink
Fix MC1243 (Distributor) off-by-one error (#1183)
Browse files Browse the repository at this point in the history
* Would distribute right+1 to the right before

Co-authored-by: Apeiron <apeiron@none>
  • Loading branch information
ApeironTsuka and Apeiron authored Apr 14, 2020
1 parent b53bc8b commit d8a3e9d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ public boolean goRight() {

currentIndex++;
getSign().setLine(3, String.valueOf(currentIndex));
if (currentIndex >= left && currentIndex <= left+right)
if (currentIndex >= left && currentIndex < left+right)
return true;
else if (currentIndex <= left)
else if (currentIndex < left)
return false;
else {
currentIndex = 0;
Expand Down Expand Up @@ -173,4 +173,4 @@ public void onPipeTransfer(PipePutEvent event) {

event.setItems(leftovers);
}
}
}

0 comments on commit d8a3e9d

Please sign in to comment.