From 40d6df787b5c481bdbe363c5d384432fc351426a Mon Sep 17 00:00:00 2001 From: Jeffrey Crowell Date: Thu, 30 Apr 2015 01:00:20 -0400 Subject: [PATCH] fix test broken in 1fa4a13eb5117a9838a156c1445f3138a8c18070 --- libr/core/cmd_search.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libr/core/cmd_search.c b/libr/core/cmd_search.c index 388151039b1f9..ac285367d5708 100644 --- a/libr/core/cmd_search.c +++ b/libr/core/cmd_search.c @@ -791,9 +791,14 @@ static int r_core_search_rop(RCore *core, ut64 from, ut64 to, int opt, const cha //Options, like JSON, linear, ... grep_arg = strchr (grep, ' '); - if (*grep && grep_arg) { - mode = *(grep_arg - 1); + if (*grep) { + if (grep_arg) { + mode = *(grep_arg - 1); grep = grep_arg; + } else { + mode = *grep; + ++grep; + } } if (*grep==' ') // grep mode