CleverRaven/Cataclysm-DDA — pull request #6227 by BevapDin (2014-02-20 19:10:31+00:00)
Title: Infinite loop on loading

1. the house spawned 2 items that are now in a mod, therefor this will not work for old games and a debugmsg is created. The json file should perhaps be moved to the mods directory.

2. That would call `JsonObject::throw_error(string,string)`, which looks up the second string argument in the positions map to get the offset in the file where the error happened (`JsonObject::verify_position`). That second string was the invalid item name, not a json objects member name, which would lead to a invalid offset: `JsonObject::verify_position` returns 0, the stream would be moved to position 0. Now `JsonIn::error` is called and the offending item name is already forgotten.

3. In `JsonIn::error`: `pos` and `startpos` would end up with the value 0 each. This leads to a infinite loop at this line `for (int i=0; i < pos-startpos-1; ++i)` which is `for(i=0;i