game: fix script event text extraction in news screen

This commit is contained in:
Crypto City 2023-02-05 22:51:47 +00:00
parent 16dd45a6b5
commit 6929caf53b

View File

@ -212,7 +212,7 @@ void UINewsDialog::UpdateFilter(const std::shared_ptr<GameWallet> &w)
{
icon = "images/book_and_quill.png";
const char *ptr0 = strchr(e.event.c_str(), '\''), *ptr1 = strrchr(e.event.c_str(), '\'');
if (ptr0 > ptr1)
if (ptr0 < ptr1)
event = std::string(ptr0 + 1, ptr1 - ptr0 - 1);
}
else if ((e.cmd == get_cc_tag<uint8_t>(cryptonote::cc_command_script_choice_t()) || e.cmd == get_cc_tag<uint8_t>(cryptonote::cc_command_start_script_t())) && boost::starts_with(e.event, "Storyline event: "))