Honor baddr=0 in RBin, as it's done for RIO ##bin

This commit is contained in:
Sergi Àlvarez i Capilla 2022-03-24 10:05:19 +01:00 committed by pancake
parent d4ce40b516
commit 6f644c307f

View File

@ -327,7 +327,7 @@ R_API bool r_bin_open_io(RBin *bin, RBinFileOptions *opt) {
RBuffer *slice = buf;
if (!is_debugger && (opt->loadaddr != 0 || opt->sz != r_buf_size (buf))) {
slice = r_buf_new_slice (buf, opt->loadaddr, opt->sz);
} else if (is_debugger && opt->baseaddr != UT64_MAX && opt->baseaddr != 0) {
} else if (is_debugger && opt->baseaddr != UT64_MAX) {
slice = r_buf_new_slice (buf, opt->baseaddr, opt->sz);
}
if (slice != buf) {