From 8cf542c170f406b44e9f54248db9e65136d7d47f Mon Sep 17 00:00:00 2001 From: Gunter Labes Date: Mon, 15 Jun 2009 12:33:30 +0000 Subject: [PATCH] ignore color markup in map labels... ...(fixes bug #13678: label color can be faked with WML markup) --- src/font.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/font.cpp b/src/font.cpp index c14e12ea314..445c4c4a7af 100644 --- a/src/font.cpp +++ b/src/font.cpp @@ -677,13 +677,12 @@ static surface render_text(const std::string& text, int fontsize, const SDL_Colo for(std::vector< std::string >::const_iterator ln = lines.begin(), ln_end = lines.end(); ln != ln_end; ++ln) { - SDL_Color col = colour; int sz = fontsize; int text_style = style; std::string::const_iterator after_markup = use_markup ? - parse_markup(ln->begin(),ln->end(),&sz,&col,&text_style) : ln->begin(); - text_surface txt_surf(sz, col, text_style); + parse_markup(ln->begin(), ln->end(), &sz, NULL, &text_style) : ln->begin(); + text_surface txt_surf(sz, colour, text_style); if (after_markup == ln->end() && ln+1 != ln_end) { // we replace empty line by a space (to have a line height)