Skip to content
This repository has been archived by the owner on Sep 5, 2021. It is now read-only.

Commit

Permalink
Fixed logical error on items.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZastrixArundell committed Jul 19, 2019
1 parent 2cea33a commit d81ae22
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

### 3.1.1
- Removed the logical error on items.

### 3.1.0
- All of the commands are multi-threaded.
- Made custom classes for custom methods.
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>com.gmail.zastrixarundell</groupId>
<artifactId>ToramBot</artifactId>
<version>3.1.0</version>
<version>3.1.1</version>

<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,14 @@ private ArrayList<ItemObject> getItems(Element body)

ArrayList<ItemObject> listOfItems = new ArrayList<>();

for(int count = 0; count < trs.size() && count < 5; count++)
for(int size = 0, count = 0; size < trs.size() && count < 5; size++)
{
if(trs.get(count).parent() == body)
listOfItems.add(new ItemObject(trs.get(count)));
System.out.println(count + " " + trs.size());
if(trs.get(size).parent() == body)
{
listOfItems.add(new ItemObject(trs.get(size)));
count++;
}
}

return listOfItems;
Expand Down

0 comments on commit d81ae22

Please sign in to comment.