Fix possible leaks in stdext::format

This commit is contained in:
Eduardo Bart
2013-02-05 20:00:28 -02:00
parent dcd6249e8f
commit cf77df05ca
6 changed files with 9 additions and 8 deletions

View File

@@ -536,7 +536,7 @@ void UIWidget::applyStyle(const OTMLNodePtr& styleNode)
for(const OTMLNodePtr& node : styleNode->children()) {
if(node->tag()[0] == '!') {
std::string tag = node->tag().substr(1);
std::string code = stdext::format("tostring(%s)", node->value().c_str());
std::string code = stdext::format("tostring(%s)", node->value());
std::string origin = "@" + node->source() + ": [" + node->tag() + "]";
g_lua.evaluateExpression(code, origin);
std::string value = g_lua.popString();