Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid bad access deref in swapchest 'A'
If a player elected to remove multiple items from the swapchest, whether by "A" or by selecting more than one in the menu, and the _second_ one in the list would have put her over the weight limit (i.e. would prompt "Continue?"), selecting 'n' rather than 'y' or 'q' to that prompt could crash the game as it tried to continue down the chain of swap items after they had been freed. Add some further tests to avoid this: do the "swap chest is dormant" check first, before testing the weight and prompting, and return -1 to stop attempting to continue down the cobj linked list when an item is removed from the swapchest.
- Loading branch information