mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-22 14:43:46 +00:00
Fixes #37. refreshDisasm function improved
This commit is contained in:
parent
4ff86cf42b
commit
097bffeb57
@ -442,6 +442,15 @@ void MemoryWidget::refreshDisasm(QString off = "") {
|
|||||||
// Get disas at offset
|
// Get disas at offset
|
||||||
if (off != "") {
|
if (off != "") {
|
||||||
this->main->core->cmd("s " + off);
|
this->main->core->cmd("s " + off);
|
||||||
|
} else {
|
||||||
|
// Get current offset
|
||||||
|
QTextCursor tc = this->disasTextEdit->textCursor();
|
||||||
|
tc.select( QTextCursor::LineUnderCursor );
|
||||||
|
QString lastline = tc.selectedText();
|
||||||
|
QString ele = lastline.split(" ", QString::SkipEmptyParts)[0];
|
||||||
|
if (ele.contains("0x")) {
|
||||||
|
this->main->core->cmd("s " + ele);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString txt2 = this->main->core->cmd("pd 100");
|
QString txt2 = this->main->core->cmd("pd 100");
|
||||||
|
Loading…
Reference in New Issue
Block a user