Skip to content

Commit

Permalink
fix bug loop count of farming apps
Browse files Browse the repository at this point in the history
  • Loading branch information
9-9-9-9 committed Dec 11, 2021
1 parent 5c40bd8 commit cf4a0f8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/bh/bot/app/farming/AbstractDoFarmingApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,10 @@ protected void internalRun(String[] args) {
info(getHelp());
loopCount = readInput("Loop count:", "how many time do you want to do " + getAppName(), s -> {
try {
int result = Integer.parseInt(s, 16) & 0xFFFFFF;
int result = Integer.parseInt(s);
if (result < 2) {
return new Tuple3<>(false, "Must be greater than 1", 0);
}
return new Tuple3<>(true, null, result);
} catch (Exception ex2) {
return new Tuple3<>(false, "Unable to parse, error: " + ex.getMessage(), 0);
Expand Down

0 comments on commit cf4a0f8

Please sign in to comment.