mirror of https://github.com/PCSX2/pcsx2.git
Debugger: fix memory search crash
This commit is contained in:
parent
d9cecbde7d
commit
33ea4e6225
|
@ -665,9 +665,11 @@ void CpuWidget::onSearchButtonClicked()
|
|||
|
||||
const QString searchValue = m_ui.txtSearchValue->text();
|
||||
|
||||
unsigned long long value;
|
||||
|
||||
if (searchType < 4)
|
||||
{
|
||||
searchValue.toULongLong(&ok, searchHex ? 16 : 10);
|
||||
value = searchValue.toULongLong(&ok, searchHex ? 16 : 10);
|
||||
}
|
||||
else if (searchType != 6)
|
||||
{
|
||||
|
@ -680,6 +682,29 @@ void CpuWidget::onSearchButtonClicked()
|
|||
return;
|
||||
}
|
||||
|
||||
switch (searchType)
|
||||
{
|
||||
case 6:
|
||||
case 5:
|
||||
case 4:
|
||||
break;
|
||||
case 3:
|
||||
if (value <= std::numeric_limits<unsigned long long>::max())
|
||||
break;
|
||||
case 2:
|
||||
if (value <= std::numeric_limits<unsigned long>::max())
|
||||
break;
|
||||
case 1:
|
||||
if (value <= std::numeric_limits<unsigned short>::max())
|
||||
break;
|
||||
case 0:
|
||||
if (value <= std::numeric_limits<unsigned char>::max())
|
||||
break;
|
||||
default:
|
||||
QMessageBox::critical(this, tr("Debugger"), tr("Value is larger than type"));
|
||||
return;
|
||||
}
|
||||
|
||||
QFutureWatcher<std::vector<u32>>* workerWatcher = new QFutureWatcher<std::vector<u32>>;
|
||||
|
||||
connect(workerWatcher, &QFutureWatcher<std::vector<u32>>::finished, [this, workerWatcher] {
|
||||
|
|
Loading…
Reference in New Issue