mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-11 15:04:23 +00:00
Fix pd-x, tests pd -x and pd--x too (#11709)
This commit is contained in:
parent
92f5af1e79
commit
d997fb62ba
@ -177,7 +177,7 @@ static RList* sections(RBinFile *bf) {
|
||||
RBinSection *ptr = NULL;
|
||||
RList *ret = NULL;
|
||||
|
||||
if (!obj || !(ret = r_list_newf (r_bin_section_free))) {
|
||||
if (!obj || !(ret = r_list_newf ((RListFree)r_bin_section_free))) {
|
||||
return NULL;
|
||||
}
|
||||
//there is not leak in section since they are cached by elf.c
|
||||
|
@ -4330,14 +4330,17 @@ static int cmd_print(void *data, const char *input) {
|
||||
ret = 0;
|
||||
goto beach;
|
||||
}
|
||||
char *p = strchr (input, ' ');
|
||||
if (p) {
|
||||
int len = (int) r_num_math (core->num, p);
|
||||
if (len == 0) {
|
||||
break;
|
||||
}
|
||||
use_blocksize = len;
|
||||
}
|
||||
char *sp = strchr (input + 1, ' ');
|
||||
if (!sp && (input[1] == '-' || IS_DIGIT (input[1]))) {
|
||||
sp = input + 1;
|
||||
}
|
||||
if (sp && *sp) {
|
||||
int n = (int) r_num_math (core->num, r_str_trim_ro (sp)); //input + 1));
|
||||
if (!n) {
|
||||
goto beach;
|
||||
}
|
||||
use_blocksize = n;
|
||||
}
|
||||
|
||||
if (core->blocksize_max < use_blocksize && (int) use_blocksize < -core->blocksize_max) {
|
||||
|
Loading…
Reference in New Issue
Block a user