mirror of
https://github.com/radareorg/radare2.git
synced 2025-01-09 15:00:42 +00:00
Fix 'ij' JSON output when no RBinInfo is found
This commit is contained in:
parent
b788deac00
commit
61a33e41da
@ -198,7 +198,11 @@ static int bin_info (RCore *r, int mode) {
|
||||
char str[R_FLAG_NAME_SIZE];
|
||||
RBinInfo *info = r_bin_get_info (r->bin);
|
||||
RBinFile *binfile = r_core_bin_cur (r);
|
||||
if (!info) return R_FALSE;
|
||||
if (!info) {
|
||||
if (mode & R_CORE_BIN_JSON)
|
||||
r_cons_printf ("{}");
|
||||
return R_FALSE;
|
||||
}
|
||||
|
||||
if (mode & R_CORE_BIN_JSON) {
|
||||
r_cons_printf ("{\"type\":\"%s\","
|
||||
|
@ -79,7 +79,7 @@ static void r_core_file_info (RCore *core, int mode) {
|
||||
static void cmd_info_bin(RCore *core, ut64 offset, int va, int mode) {
|
||||
if (core->file) {
|
||||
if (mode == R_CORE_BIN_JSON)
|
||||
r_cons_printf ("{\"bin\":{");
|
||||
r_cons_printf ("{\"bin\":");
|
||||
r_core_bin_info (core, R_CORE_BIN_ACC_INFO,
|
||||
mode, va, NULL, offset);
|
||||
if (mode == R_CORE_BIN_JSON)
|
||||
|
Loading…
Reference in New Issue
Block a user