add CRCInput::getKeyNameC to fix lifetime issues

in menu.cpp, getKeyName().c_str()'s destructor was already invoked
when the value was used, triggering a valgrind warning.
This commit is contained in:
Stefan Seyfried
2012-10-31 22:52:12 +01:00
parent 047223440b
commit d5d136f6c1
3 changed files with 9 additions and 3 deletions

View File

@@ -858,7 +858,7 @@ void CMenuWidget::calcSize()
{
const char *tmp;
if (items[i]->iconName.empty())
tmp = CRCInput::getKeyName(items[i]->directKey).c_str();
tmp = CRCInput::getKeyNameC(items[i]->directKey);
else
tmp = items[i]->iconName.c_str();
int w, h;