From 59787b8ccfdc61d503ca4c657122ef98a29cf78e Mon Sep 17 00:00:00 2001 From: BlueC0re Date: Fri, 23 Jun 2017 03:29:10 +0200 Subject: [PATCH] added v modifier to rapatch similar to wv (#7806) usage: 0 v4 40000 4 v2 300 --- libr/core/patch.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libr/core/patch.c b/libr/core/patch.c index 9747899a2f..94953fed0d 100644 --- a/libr/core/patch.c +++ b/libr/core/patch.c @@ -22,6 +22,17 @@ R_API int r_core_patch_line (RCore *core, char *str) { r_core_cmdf (core, "s %s", str); r_core_cmdf (core, "wa %s", p); break; + case 'v': + q = strchr (p + 1,' '); + if (q) { + *q = 0; + for (++q; *q == ' '; q++); // XXX: skipsspaces here + } else { + return 0; + } + r_core_cmdf (core, "s %s", str); + r_core_cmdf (core, "wv%s %s", p + 1, q); + break; default: r_core_cmdf (core, "s %s", str); r_core_cmdf (core, "wx %s", p);