Fix crash in GenericDrawTextSurface::drawChar() when a TTF is used with Unicode text

This commit is contained in:
David Capello 2016-03-15 15:10:56 -03:00
parent cb4b4f8b4d
commit 6f0819fa30

View File

@ -112,9 +112,10 @@ public:
}
case FontType::kTrueType: {
std::string str;
// TODO avoid a temporary string
std::wstring str;
str.push_back(chr);
drawString(font, fg, bg, x, y, str);
drawString(font, fg, bg, x, y, base::to_utf8(str).c_str());
break;
}