diff options
| author | Léo Lam <leolino.lam@gmail.com> | 2018-04-27 23:39:42 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-04-27 23:39:42 +0200 |
| commit | 732ebd42ee871c6b1135260d6d6a45d4d58ec108 (patch) | |
| tree | 376d4a4c394e184b58138172b0f5cf6c37660159 /Source/Core/DolphinQt2/Config/CheatCodeEditor.cpp | |
| parent | 2b9df8eedd1184a94a8c1ece9a2c8a9fb500afcb (diff) | |
| parent | 9057a7d50a76794badb9b027be25ed8d3220ca61 (diff) | |
Merge pull request #6702 from spycrab/qt_gecko_fixes
Qt/GeckoCode: Fix multiple bugs
Diffstat (limited to 'Source/Core/DolphinQt2/Config/CheatCodeEditor.cpp')
| -rw-r--r-- | Source/Core/DolphinQt2/Config/CheatCodeEditor.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/DolphinQt2/Config/CheatCodeEditor.cpp b/Source/Core/DolphinQt2/Config/CheatCodeEditor.cpp index 3d786fa098..db30d7e156 100644 --- a/Source/Core/DolphinQt2/Config/CheatCodeEditor.cpp +++ b/Source/Core/DolphinQt2/Config/CheatCodeEditor.cpp @@ -234,12 +234,13 @@ bool CheatCodeEditor::AcceptGecko() QStringList values = line.split(QStringLiteral(" ")); - bool good = true; + bool good = values.size() == 2; u32 addr = 0; u32 value = 0; - addr = values[0].toUInt(&good, 16); + if (good) + addr = values[0].toUInt(&good, 16); if (good) value = values[1].toUInt(&good, 16); @@ -272,7 +273,7 @@ bool CheatCodeEditor::AcceptGecko() { QMessageBox::critical(this, tr("Error"), tr("The resulting decrypted AR code doesn't contain any lines.")); - return true; + return false; } m_gecko_code->name = m_name_edit->text().toStdString(); |
