added v modifier to rapatch similar to wv (#7806)

usage:

0 v4 40000
4 v2 300
This commit is contained in:
BlueC0re 2017-06-23 03:29:10 +02:00 committed by radare
parent 5c39365c57
commit 59787b8ccf

View File

@ -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);