fix bug 6571 thx to qk-gen

This commit is contained in:
Jérémy Rosen 2006-09-06 20:38:06 +00:00
parent 3d42ad18b7
commit 68bfdb9ea3

View file

@ -584,7 +584,13 @@ void read_save_file(const std::string& name, config& cfg, std::string* error_log
file_stream = istream_file(get_saves_dir() + "/" + name);
cfg.clear();
try{
detect_format_and_read(cfg, *file_stream, error_log);
} catch (config::error &err)
{
std::cerr << err.message;
throw game::load_game_failed();
}
if(cfg.empty()) {
std::cerr << "Could not parse file data into config\n";