Skip to content

Commit

Permalink
Make ai::description's text field a t_string, and initialize it from one
Browse files Browse the repository at this point in the history
Fixes bug #22092, which was caused by taking the translated form of a
WML attribute as a STL string only once.
  • Loading branch information
irydacea committed Jun 29, 2014
1 parent 5e9b821 commit 308176d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelog
Expand Up @@ -40,6 +40,9 @@ Version 1.11.15+dev:
* Added a button to copy the in-game Chat Log dialog contents to clipboard.
* Fixed dependency check on MP mod locked to scenario on create game load
checking against the first scenario instead of the last played scenario.
* Fixed AI engine names in the MP game setup screen being translated to the
language selected when Wesnoth was started rather than the current
language (bug #22092).
* WML engine:
* Fixed a regression in 1.11.14 causing WML parser/preprocessor errors to
not interrupt the game load sequence or display an error message in-game,
Expand Down
4 changes: 2 additions & 2 deletions src/ai/configuration.cpp
Expand Up @@ -112,7 +112,7 @@ void configuration::init(const config &game_config)

description desc;
desc.id=id;
desc.text = ai_configuration["description"].str();
desc.text = ai_configuration["description"].t_str();
desc.cfg=ai_configuration;

ai_configurations_.insert(std::make_pair(id,desc));
Expand All @@ -137,7 +137,7 @@ void extract_ai_configurations(std::map<std::string, description> &storage, cons

description desc;
desc.id=id;
desc.text = ai_configuration["description"].str();
desc.text = ai_configuration["description"].t_str();
desc.cfg=ai_configuration;

storage.insert(std::make_pair(id,desc));
Expand Down
2 changes: 1 addition & 1 deletion src/ai/configuration.hpp
Expand Up @@ -51,7 +51,7 @@ struct description {
{
}

std::string text;
t_string text;
std::string id;
config cfg;
};
Expand Down

0 comments on commit 308176d

Please sign in to comment.