mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-05 06:40:07 +00:00
fix bug 6571 thx to qk-gen
This commit is contained in:
parent
121ebddaa3
commit
770e4bb961
@ -523,7 +523,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…
x
Reference in New Issue
Block a user