Fixes #37. refreshDisasm function improved

This commit is contained in:
Hugo Teso 2017-03-31 11:58:41 +02:00
parent 4ff86cf42b
commit 097bffeb57

View File

@ -442,6 +442,15 @@ void MemoryWidget::refreshDisasm(QString off = "") {
// Get disas at offset
if (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");