Skip to content

Commit

Permalink
Quote wa command generated in visual mode (#11138)
Browse files Browse the repository at this point in the history
  • Loading branch information
cryslith authored and radare committed Jun 30, 2019
1 parent f56c250 commit aeb35a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libr/core/visual.c
Original file line number Diff line number Diff line change
Expand Up @@ -2442,12 +2442,13 @@ R_API int r_core_visual_cmd(RCore *core, const char *arg) {
r_core_visual_showcursor (core, true);
r_cons_flush ();
r_cons_set_raw (false);
strcpy (buf, "wa ");
strcpy (buf, "\"wa ");
r_line_set_prompt (":> ");
r_cons_enable_mouse (false);
if (r_cons_fgets (buf + 3, 1000, 0, NULL) < 0) {
if (r_cons_fgets (buf + 4, sizeof (buf) - 5, 0, NULL) < 0) {
buf[0] = '\0';
}
strcat (buf, "\"");
int wheel = r_config_get_i (core->config, "scr.wheel");
if (wheel) {
r_cons_enable_mouse (true);
Expand Down

0 comments on commit aeb35a6

Please sign in to comment.