From 12c1d2c5ab3136708111f96e0705a78e55fac33a Mon Sep 17 00:00:00 2001 From: int_13h <30789322+nk521@users.noreply.github.com> Date: Wed, 1 Jan 2020 19:09:27 +0530 Subject: [PATCH] Show multiple instructions in edit->bytes dialog closes #1940 --- src/dialogs/EditInstructionDialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dialogs/EditInstructionDialog.cpp b/src/dialogs/EditInstructionDialog.cpp index 52237a4c..ddf0d54e 100644 --- a/src/dialogs/EditInstructionDialog.cpp +++ b/src/dialogs/EditInstructionDialog.cpp @@ -46,13 +46,13 @@ void EditInstructionDialog::updatePreview(const QString &input) return; } else if (editMode == EDIT_BYTES) { QByteArray data = CutterCore::hexStringToBytes(input); - result = Core()->disassemble(data).trimmed(); + result = Core()->disassemble(data).simplified(); } else if (editMode == EDIT_TEXT) { QByteArray data = Core()->assemble(input); result = CutterCore::bytesToHexString(data).trimmed(); } - if (result.isEmpty() || result.contains(QLatin1Char('\n'))) { + if (result.isEmpty() || result.contains("invalid")) { ui->instructionLabel->setText("Unknown Instruction"); } else { ui->instructionLabel->setText(result);