From c6743de8652caa30e02d769b0a17e7fbdad12214 Mon Sep 17 00:00:00 2001 From: Tomasz Gorochowik Date: Fri, 16 Apr 2021 19:31:09 +0200 Subject: [PATCH] Fix json output for regexp in rafind2 ##search --- libr/main/rafind2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libr/main/rafind2.c b/libr/main/rafind2.c index df94432c56..3291e93892 100644 --- a/libr/main/rafind2.c +++ b/libr/main/rafind2.c @@ -464,7 +464,7 @@ R_API int r_main_rafind2(int argc, const char **argv) { if (opt.ind + 1 == argc && !r_file_is_directory (argv[opt.ind])) { ro.quiet = true; } - if (ro.json && ro.mode == R_SEARCH_KEYWORD) { + if (ro.json && (ro.mode == R_SEARCH_KEYWORD || ro.mode == R_SEARCH_REGEXP)) { // TODO: remove mode check when all modes use api ro.pj = pj_new (); pj_a (ro.pj);