Merge pull request #7429 from RolandMunsil/master

Fix two bugs in Cheat Manager
This commit is contained in:
JosJuice 2018-09-26 13:53:41 +02:00 committed by GitHub
commit bcb5a6f0ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -163,7 +163,7 @@ void CheatsManager::OnWatchContextMenu()
QMenu* menu = new QMenu(this);
menu->addAction(tr("Remove from Watch"), this, [this] {
auto* item = m_match_table->selectedItems()[0];
auto* item = m_watch_table->selectedItems()[0];
int index = item->data(INDEX_ROLE).toInt();
@ -397,11 +397,11 @@ static bool Compare(T mem_value, T value, CompareType op)
case CompareType::Less:
return mem_value < value;
case CompareType::LessEqual:
return mem_value <= mem_value;
return mem_value <= value;
case CompareType::More:
return value > mem_value;
return mem_value > value;
case CompareType::MoreEqual:
return value >= mem_value;
return mem_value >= value;
default:
return false;
}