Functional Storage

Functional Storage

31M Downloads

[1.20.1] Item duplication bug due to wrong priority for iron downgrade

Windows2066 opened this issue ยท 2 comments

commented

Functional Storage Version: 1.20.1-1.2.12

Titanium Version: 3.8.32

In this bug, you can duplicate items esaily:

  1. put a copper upgrade(or any other upgrades) and an iron downgrade in a drawerImage
  2. put more than 64 items in the drawerImage
  3. take the upgrade away, just leave a iron downgrade in the drawerImage
  4. put another empty drawer beside it and put a item in it(same as the items in the drawer with iron downgrade)

Image

  1. put a puller upgrade in the drawer with iron downgrade and orient it to match the other drawer

Image

then the items start to duplicate

commented

I'd like to add here that the speed of the duplication depends purely on the amount of items above the 64 limit.
Additionally, this type of insertion into a barrel ignores the void upgrade.

This leads me to believe that "Remove" part of code is being called with a negative amount resulting in an unchecked addition.

commented

Image

This bug even allows the number of drawer items to break the limit