0.A SDL Stable - Disassembling Books

Got a bug where I tried to disassemble the Sutras of Buddha while wielding it, and I got the debug message:

DEBUG: Tried to remove a item not in inventory (name: The Sutras of Buddha)
Press Spacebar…

I still get the 80 pieces of paper on the ground below me as well as keeping the book in my hand. Infinite papers. I’m going to try to do it with another book when I have time and see if it does it for all of them

Only with this book?

Can you give us your savegame and version info?

The inventory::remove_item function uses a somewhat suspicious method of checking if the item to be removed matches the target.

Now, I do have trouble understanding pointers, but something there looks off to me.

I’ve had it happen a few times. Disassembling held items tends to be the trigger.