diff --git a/libr/core/cbin.c b/libr/core/cbin.c index cd1e421408..75c3708924 100644 --- a/libr/core/cbin.c +++ b/libr/core/cbin.c @@ -4393,6 +4393,10 @@ R_API bool r_core_bin_set_arch_bits(RCore *r, const char *name, const char *_arc return false; } } + if (!strcmp (arch, "null")) { + free (arch); + arch = strdup (R_SYS_ARCH); + } /* Find a file with the requested name/arch/bits */ RBinFile *binfile = r_bin_file_find_by_arch_bits (r->bin, arch, bits); if (!binfile) { diff --git a/test/db/formats/mach0/entitlements b/test/db/formats/mach0/entitlements index 33665f5a0c..3a6a6948e4 100644 --- a/test/db/formats/mach0/entitlements +++ b/test/db/formats/mach0/entitlements @@ -42,6 +42,7 @@ RUN NAME=entitlements with rabin2 FILE=bins/mach0/AppIOSEntitlements.ios +ARGS=-a x86 CMDS=!rabin2 -OC `i~file:0[1]` EXPECT=<