From 709d20105ef6d08c89c1fa490677eaa6c00a888c Mon Sep 17 00:00:00 2001 From: xarkes Date: Sat, 2 Dec 2017 18:54:00 +0100 Subject: [PATCH] Remove some errors --- src/widgets/HexdumpWidget.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/widgets/HexdumpWidget.cpp b/src/widgets/HexdumpWidget.cpp index 0c04ed38..3dfdb517 100644 --- a/src/widgets/HexdumpWidget.cpp +++ b/src/widgets/HexdumpWidget.cpp @@ -574,6 +574,11 @@ void HexdumpWidget::on_hexHexText_selectionChanged() { if (parsing == "Dissasembly") { + QString dText = QString(sel_text); + dText.replace(" ", ""); + if (dText.length() % 2 != 0) { + return; + } // Get selected combos QString arch = ui->hexArchComboBox_2->currentText(); QString bits = ui->hexBitsComboBox_2->currentText(); @@ -583,7 +588,7 @@ void HexdumpWidget::on_hexHexText_selectionChanged() Core()->setConfig("asm.arch", arch); Core()->setConfig("asm.bits", bits); - QString str = Core()->cmd("pad " + sel_text); + QString str = Core()->cmd("pad " + dText); ui->hexDisasTextEdit->setPlainText(str); Core()->setConfig("asm.arch", oarch); Core()->setConfig("asm.bits", obits);