mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 19:06:10 +00:00
parent
7e6a8ae17a
commit
12c1d2c5ab
@ -46,13 +46,13 @@ void EditInstructionDialog::updatePreview(const QString &input)
|
|||||||
return;
|
return;
|
||||||
} else if (editMode == EDIT_BYTES) {
|
} else if (editMode == EDIT_BYTES) {
|
||||||
QByteArray data = CutterCore::hexStringToBytes(input);
|
QByteArray data = CutterCore::hexStringToBytes(input);
|
||||||
result = Core()->disassemble(data).trimmed();
|
result = Core()->disassemble(data).simplified();
|
||||||
} else if (editMode == EDIT_TEXT) {
|
} else if (editMode == EDIT_TEXT) {
|
||||||
QByteArray data = Core()->assemble(input);
|
QByteArray data = Core()->assemble(input);
|
||||||
result = CutterCore::bytesToHexString(data).trimmed();
|
result = CutterCore::bytesToHexString(data).trimmed();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.isEmpty() || result.contains(QLatin1Char('\n'))) {
|
if (result.isEmpty() || result.contains("invalid")) {
|
||||||
ui->instructionLabel->setText("Unknown Instruction");
|
ui->instructionLabel->setText("Unknown Instruction");
|
||||||
} else {
|
} else {
|
||||||
ui->instructionLabel->setText(result);
|
ui->instructionLabel->setText(result);
|
||||||
|
Loading…
Reference in New Issue
Block a user