[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Wesnoth-cvs-commits] wesnoth/src help.cpp
From: |
Kristoffer Erlandsson |
Subject: |
[Wesnoth-cvs-commits] wesnoth/src help.cpp |
Date: |
Sun, 29 Aug 2004 12:53:37 -0400 |
CVSROOT: /cvsroot/wesnoth
Module name: wesnoth
Branch:
Changes by: Kristoffer Erlandsson <address@hidden> 04/08/29 16:48:01
Modified files:
src : help.cpp
Log message:
Potential fix to the help system parse errors occuring. Made the error
message more descriptive to help with further debugging.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/wesnoth/wesnoth/src/help.cpp.diff?tr1=1.27&tr2=1.28&r1=text&r2=text
Patches:
Index: wesnoth/src/help.cpp
diff -u wesnoth/src/help.cpp:1.27 wesnoth/src/help.cpp:1.28
--- wesnoth/src/help.cpp:1.27 Wed Aug 25 02:59:51 2004
+++ wesnoth/src/help.cpp Sun Aug 29 16:48:01 2004
@@ -579,7 +579,7 @@
if (lang_unit == "") {
lang_unit = *advance_it;
}
- ss << "<ref>dst='" << ref_id << "'
text='" << escape(lang_unit)
+ ss << "<ref>dst='" << escape(ref_id) <<
"' text='" << escape(lang_unit)
<< "'</ref>";
if (advance_it + 1 != next_units.end())
{
ss << ", ";
@@ -599,7 +599,7 @@
if (lang_ability == "") {
lang_ability = *ability_it;
}
- ss << "<ref>dst='" << ref_id << "'
text='" << escape(lang_ability)
+ ss << "<ref>dst='" << escape(ref_id) <<
"' text='" << escape(lang_ability)
<< "'</ref>";
if (ability_it + 1 !=
type.abilities().end()) {
ss << ", ";
@@ -702,7 +702,7 @@
if (lang_special == "") {
lang_special =
attack_it->special();
}
- attack_ss << "<ref>dst='" <<
ref_id << "' text='"
+ attack_ss << "<ref>dst='" <<
escape(ref_id) << "' text='"
<<
escape(lang_special) << "'</ref>";
row.push_back(std::make_pair(attack_ss.str(),
font::line_width(lang_special, normal_font_size)));
@@ -787,7 +787,7 @@
const int moves =
movement_type.movement_cost(*map,terrain);
std::stringstream str;
str << "<ref>text='" <<
escape(name) << "' dst='"
- <<
std::string("terrain_") + terrain << "'</ref>";
+ <<
escape(std::string("terrain_") + terrain) << "'</ref>";
row.push_back(std::make_pair(str.str(),
font::line_width(name,
normal_font_size)));
@@ -863,7 +863,7 @@
const gamemap::TERRAIN t = *it;
const std::string alias_name =
string_table[map->terrain_name(t)];
alias_ss << "<ref>text='" << escape(alias_name)
<< "' dst='"
- << std::string("terrain_") + t
<< "'</ref>";
+ <<
escape(std::string("terrain_") + t) << "'</ref>";
if (it + 2 == aliased_terrains.end()) {
alias_ss << " " << _("or") << " ";
}
@@ -1356,7 +1356,10 @@
show_ref = false;
}
if (dst == "" || text == "") {
- throw parse_error("Ref markup must have both dst and text
attributes.");
+ std::string msg =
+ "Ref markup must have both dst and text attributes.
Please submit a bug report if you have not modified the game files yourself.
Errornous config: ";
+ msg += cfg.write();
+ throw parse_error(msg);
}
if (show_ref) {
add_text_item(text, dst);
- [Wesnoth-cvs-commits] wesnoth/src help.cpp,
Kristoffer Erlandsson <=