CleverRaven/Cataclysm-DDA — pull request #4469 by GalenEvil (2013-11-18 18:17:43+00:00)
Title: [FIX] Sav loading across picojson -> json conversion

Hopefully make old save loading across the picojson->json conversion threshold more stable

Tested using a world and player created in a version prior to the conversion and loading it into the current mainline version. Issue found was that despite exactly the same syntax when trying to fetch the JsonArray value for "stair_monsters"; it would fail to get it, but no check was made to see if the JsonArray is valid, so the while-loop would continue forever and eat up massive amounts of RAM.
If that was commented out it would continue onto the player deserialization portion. Player deserialization would take forever and typically not load properly as shown by the inventory items disappearing, and also would consume large amounts of RAM while attempting this. Time of day would also be changed. In my case it would go from "Start of the game with default time" to about 1:40AM.