getContents bug #12

Closed
opened 2014-09-18 08:58:32 -04:00 by Kraeutergarten · 1 comment
Kraeutergarten commented 2014-09-18 08:58:32 -04:00 (Migrated from github.com)

Hey i have found a bug :S

 @Override
public ItemStack[] getContents() {
ItemStack[] C = new ItemStack[getSize()];
System.arraycopy(items, 0, C, 0, items.length);
System.arraycopy(items, 0, C, items.length, armor.length);
return C;
}

Should it not look like:
System.arraycopy(armor, 0, C, items.length, armor.length);

Hey i have found a bug :S ``` @Override public ItemStack[] getContents() { ItemStack[] C = new ItemStack[getSize()]; System.arraycopy(items, 0, C, 0, items.length); System.arraycopy(items, 0, C, items.length, armor.length); return C; } ``` Should it not look like: System.arraycopy(armor, 0, C, items.length, armor.length);
lishid commented 2014-09-18 14:43:59 -04:00 (Migrated from github.com)

Interesting, seems like I missed this two years ago! But interestingly nobody has complained about it...

If you got some time, you can go ahead and send a pull request. Otherwise I'll fix that up later when I have time.

Interesting, seems like I missed this two years ago! But interestingly nobody has complained about it... If you got some time, you can go ahead and send a pull request. Otherwise I'll fix that up later when I have time.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: minster586/OpenInv#12
No description provided.