Fix specific usage of Con::executef where it was not being assigned to a ConsoleValue before getting it's data out of it.

This commit is contained in:
Jeff Hutchinson 2021-09-24 19:32:57 -04:00
parent 0f89373782
commit 755bbacaa0
13 changed files with 35 additions and 21 deletions

View file

@ -226,7 +226,9 @@ void GuiPopupMenuTextListCtrl::onMouseUp(const GuiEvent &event)
if (item)
{
if (item->mEnabled)
dAtob(Con::executef(mPopup, "onSelectItem", Con::getIntArg(getSelectedCell().y), item->mText.isNotEmpty() ? item->mText : ""));
{
Con::executef(mPopup, "onSelectItem", Con::getIntArg(getSelectedCell().y), item->mText.isNotEmpty() ? item->mText : "");
}
}
}

View file

@ -288,7 +288,8 @@ bool PopupMenu::canHandleID(U32 id)
bool PopupMenu::handleSelect(U32 command, const char *text /* = NULL */)
{
return dAtob(Con::executef(this, "onSelectItem", Con::getIntArg(command), text ? text : ""));
ConsoleValue cValue = Con::executef(this, "onSelectItem", Con::getIntArg(command), text ? text : "");
return cValue.getBool();
}
//////////////////////////////////////////////////////////////////////////