Skip to content

Commit

Permalink
Fix code instead of help message for the yank command ##shell
Browse files Browse the repository at this point in the history
* 2nd optional arg is the offset instead of curseek
  • Loading branch information
radare committed Oct 23, 2023
1 parent 058a96f commit 5e2b108
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion libr/core/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,13 @@ static int cmd_yank(void *data, const char *input) {
RCore *core = (RCore *)data;
switch (input[0]) {
case ' ': // "y "
r_core_yank (core, core->offset, r_num_math (core->num, input + 1));
{
char *args = r_str_trim_dup (input + 1);
char *arg = r_str_after (args, ' ');
ut64 addr = arg? r_num_math (core->num, arg): core->offset;
r_core_yank (core, addr, r_num_math (core->num, args));
free (args);
}
break;
case '-': // "y-"
r_core_yank_unset (core);
Expand Down

0 comments on commit 5e2b108

Please sign in to comment.