Fix #3113 - Wrong usage of rz_cmd_call instead of rz_core_cmd and @!

This commit is contained in:
wargio 2023-02-18 21:12:27 +08:00 committed by Anton Kochkov
parent 235b75f3ed
commit f2e00c59c8
2 changed files with 3 additions and 4 deletions

View File

@ -475,8 +475,8 @@ QString CutterCore::cmdRaw(const char *cmd)
CORE_LOCK(); CORE_LOCK();
rz_cons_push(); rz_cons_push();
// rz_cmd_call does not return the output of the command // rz_core_cmd does not return the output of the command
rz_cmd_call(core->rcmd, cmd); rz_core_cmd(core, cmd, 0);
// we grab the output straight from rz_cons // we grab the output straight from rz_cons
res = rz_cons_get_buffer(); res = rz_cons_get_buffer();
@ -4494,7 +4494,6 @@ QByteArray CutterCore::ioRead(RVA addr, int len)
/* Zero-copy */ /* Zero-copy */
array.resize(len); array.resize(len);
if (!rz_io_read_at(core->io, addr, (uint8_t *)array.data(), len)) { if (!rz_io_read_at(core->io, addr, (uint8_t *)array.data(), len)) {
qWarning() << "Can't read data" << addr << len;
array.fill(0xff); array.fill(0xff);
} }

View File

@ -240,7 +240,7 @@ void HexdumpWidget::updateParseWindow(RVA start_address, int size)
ui->hexDisasTextEdit->setPlainText( ui->hexDisasTextEdit->setPlainText(
selectedCommand != "" ? Core()->cmdRawAt( selectedCommand != "" ? Core()->cmdRawAt(
QString("%1 %2").arg(selectedCommand).arg(size), start_address) QString("%1 @! %2").arg(selectedCommand).arg(size), start_address)
: ""); : "");
} else { } else {
// Fill the information tab hashes and entropy // Fill the information tab hashes and entropy