Crafting sometimes crashes on inventory.cpp, and another bug

I’m talking about the github repo, not 0.5 release.

It seems I can reproduce this bug.

  1. Make a pointy stick
  2. kill a squirrel and butcher for meat
  3. light a fire (use matchbook over a heavy stick, for example)
  4. make cooked meat

When the meat is done, the game crashes and the assertion message says the iterator is not decrementable, or something like that.
The debug trace shows the error is on line 872 of inventory.cpp, and if I add a break point before that, it shows the item is “meat”.

Another bug is sometimes I can’t light anything but the message shows “you successfully light a fire”.
This happens usually after I save and reload a game.

Sorry for double posting.
It seems the first problem I mentioned was quite msvc specific.

A list is not decrementable if it is empty no matter the iterator is pointing to the end or not.

That’s actually concerning, although it’ll be a pain to fix. I’ll post something on the Github issue tracker.

Thank you. :slight_smile: