You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As an example, give yourself 10 scrap metal and force drop it, only 5 will be dropped.
I believe there's a simple fix to it. Do not iterate over the indices in a page front to back as you are removing items from the list and the indexes will change. Instead, iterate over the items in reverse with for (byte index = count - 1; index >= 0 ; index--) instead of the current for (byte index = 0; index < count; index++).
The text was updated successfully, but these errors were encountered:
As an example, give yourself 10 scrap metal and force drop it, only 5 will be dropped.
I believe there's a simple fix to it. Do not iterate over the indices in a page front to back as you are removing items from the list and the indexes will change. Instead, iterate over the items in reverse with
for (byte index = count - 1; index >= 0 ; index--)
instead of the currentfor (byte index = 0; index < count; index++)
.The text was updated successfully, but these errors were encountered: