Skip to content

Commit

Permalink
Merge pull request #335 from cbeck88/mp_connect_bool_test
Browse files Browse the repository at this point in the history
check properly if a config attribute value is not a boolean
  • Loading branch information
cbeck88 committed Dec 1, 2014
2 parents 7ae79e8 + 856f3ac commit 2fa43e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/multiplayer_connect_engine.cpp
Expand Up @@ -1059,12 +1059,12 @@ config side_engine::new_config() const
res["income"] = income_;

if (!parent_.params_.use_map_settings || res["fog"].empty() ||
(res["fog"] != "yes" && res["fog"] != "no")) {
(res["fog"].to_bool(true) == true && res["fog"].to_bool(false) == false)) {
res["fog"] = parent_.params_.fog_game;
}

if (!parent_.params_.use_map_settings || res["shroud"].empty() ||
(res["shroud"] != "yes" && res["shroud"] != "no")) {
(res["shroud"].to_bool(true) == true && res["shroud"].to_bool(false) == false)) {
res["shroud"] = parent_.params_.shroud_game;
}

Expand Down

0 comments on commit 2fa43e3

Please sign in to comment.