mirror of
https://github.com/rizinorg/cutter.git
synced 2025-02-22 22:53:49 +00:00
Fixed function to get end basic blocks
This commit is contained in:
parent
2e69754f76
commit
a68d22f608
@ -441,10 +441,14 @@ int QRCore::fcnEndBbs(QString addr) {
|
|||||||
int offset = addr.toLong(&ok, 16);
|
int offset = addr.toLong(&ok, 16);
|
||||||
RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, offset, 0);
|
RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, offset, 0);
|
||||||
if (fcn) {
|
if (fcn) {
|
||||||
QString endbbs = this->cmd("afi @ " + addr + " ~end-bbs").split("\n")[0].split(": ")[1];
|
QString tmp = this->cmd("afi @ " + addr + " ~end-bbs").split("\n")[0];
|
||||||
|
if (tmp.contains(":")) {
|
||||||
|
QString endbbs = tmp.split(": ")[1];
|
||||||
return endbbs.toInt();
|
return endbbs.toInt();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QRCore::itoa(ut64 num, int rdx) {
|
QString QRCore::itoa(ut64 num, int rdx) {
|
||||||
|
Loading…
Reference in New Issue
Block a user