Fixed hang when there are multiple '>' in cmd line

This commit is contained in:
Khairul Kasmiran 2018-01-09 21:32:36 +08:00
parent 3d6584f934
commit b2d2cb25f7

View File

@ -2025,7 +2025,7 @@ static int r_core_cmd_subst_i(RCore *core, char *cmd, char *colon) {
next:
#endif
/* pipe console to file */
ptr = (char *)r_str_lastbut (cmd, '>', "\"");
ptr = (char *)r_str_firstbut (cmd, '>', "\"");
// TODO honor `
if (ptr) {
int fdn = 1;