Openapoc: Inventory Space/Template Bug

Created on 14 Jul 2019  ·  3Comments  ·  Source: OpenApoc/OpenApoc

Related to Issue #637 with this bug, the storage space goes to 999%+. However, when attempting to sell these toxi-gun A clips, they do not appear in the list of things to sell. This then leaves storage too full to buy, sell, or transfer anything, including aliens. Also, it appears craft can't drop aliens (and captured equipment) off at other bases before returning to their home base. This also prevents the transfer of things.

save_Inventory Space-Template Bug.zip

!BUG! MEDIUM PRIORITY !BUG! low priority

Most helpful comment

Update: In my stream today, I learned that if I duplicate more clips, it pushes the inventory number to even more ridiculous numbers. However, this somehow allows selling and transferring to work again, though the toxi-gun A, B, and C clips are then not able to be sold from that base.

All 3 comments

Update: In my stream today, I learned that if I duplicate more clips, it pushes the inventory number to even more ridiculous numbers. However, this somehow allows selling and transferring to work again, though the toxi-gun A, B, and C clips are then not able to be sold from that base.

So I have found an issue when a template stores a weapon with more ammo than is available when applying it - it doesn't check or clamp the current value, causing an underflow in the inventory (which as it's unsigned causes it to go a /really/ high value, some 4 billion on a 32bit integer).

Think this was fixed by #654

Was this page helpful?
0 / 5 - 0 ratings

Related issues

makus82 picture makus82  ·  3Comments

Quickmind01 picture Quickmind01  ·  3Comments

FilmBoy84 picture FilmBoy84  ·  3Comments

BeornTB picture BeornTB  ·  3Comments

emc2 picture emc2  ·  3Comments