Fixed problem with non pe bins and resources (#8037)

This commit is contained in:
Antonio Sánchez 2017-07-26 23:14:54 +02:00 committed by radare
parent 277771156c
commit 0ed41fbb65

View File

@ -2751,6 +2751,12 @@ static void bin_pe_resources(RCore *r, int mode) {
}
}
static void bin_no_resources(RCore *r, int mode) {
if (IS_MODE_JSON (mode)) {
r_cons_printf ("[]");
}
}
static int bin_resources(RCore *r, int mode) {
const RBinInfo *info = r_bin_get_info (r->bin);
@ -2759,6 +2765,8 @@ static int bin_resources(RCore *r, int mode) {
}
if (!strncmp ("pe", info->rclass, 2)) {
bin_pe_resources (r, mode);
} else {
bin_no_resources (r, mode);
}
return true;
}