fix bug 6571 thx to qk-gen
This commit is contained in:
parent
3d42ad18b7
commit
68bfdb9ea3
1 changed files with 6 additions and 0 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Reference in a new issue