CleverRaven/Cataclysm-DDA — pull request #9644 by BevapDin (2014-10-22 20:20:47+00:00)
Title: Fix for "Odd prompts when moving large quantities of things"

Fixes #9608

The prompt says maximal amount of items to move is 4051, there are already 45 items on the square, together that would be 4096 items, that looks suspicious like `MAX_ITEM_IN_SQUARE`. Indeed the code did assume one charge consumes one item "slot" (in regard to the maximal item count on the square), but items counted by charges only take up one item slot as all items merge into one.

----

I added a check for negative maximal values, the item volume / maximal volume per square can change:
Old save item a had volume 1, new save it has volume 2, therefor the total volume of items in a square would be greater and can exceed the maximal volume, this leads to negative transfer amounts.