r2 -b acts like -e asm.bits, which resulted in anal plug issue (#18438)

This commit is contained in:
pancake 2021-03-11 20:07:16 +01:00 committed by GitHub
parent 91af7cf3ef
commit 3694865726
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* radare - LGPL - Copyright 2009-2020 - pancake */
/* radare - LGPL - Copyright 2009-2021 - pancake */
#include <r_main.h>
#include <r_util.h>

View File

@ -483,6 +483,7 @@ R_API int r_main_radare2(int argc, const char **argv) {
break;
case 'b':
asmbits = opt.arg;
r_config_set (r->config, "asm.bits", opt.arg);
break;
case 'B':
baddr = r_num_math (r->num, opt.arg);
@ -510,7 +511,7 @@ R_API int r_main_radare2(int argc, const char **argv) {
r_cons_flush ();
LISTS_FREE ();
free (envprofile);
free (debugbackend);
free (debugbackend);
return 0;
}
break;
@ -1250,12 +1251,12 @@ R_API int r_main_radare2(int argc, const char **argv) {
r_config_eval (r->config, cmdn, false);
r_cons_flush ();
}
if (asmarch) {
r_config_set (r->config, "asm.arch", asmarch);
}
if (asmbits) {
r_config_set (r->config, "asm.bits", asmbits);
}
if (asmarch) {
r_config_set (r->config, "asm.arch", asmarch);
}
if (asmos) {
r_config_set (r->config, "asm.os", asmos);
}