From 6f5b3167eca7872721301c85f5d5b22cf9280f5a Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Wed, 25 Nov 2009 17:13:54 +0000 Subject: [PATCH] [7.2.306] shellescape("10%%", 1) only escapes first %. (Christian Brabandt) Problem: shellescape("10%%", 1) only escapes first %. (Christian Brabandt) Solution: Don't copy the character after the escaped one. Patch 7.2.306 --- src/misc2.c | 1 + src/version.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/misc2.c b/src/misc2.c index ec3849f5..e157aae9 100644 --- a/src/misc2.c +++ b/src/misc2.c @@ -1390,6 +1390,7 @@ vim_strsave_shellescape(string, do_special) *d++ = '\\'; /* insert backslash */ while (--l >= 0) /* copy the var */ *d++ = *p++; + continue; } MB_COPY_CHAR(p, d); diff --git a/src/version.c b/src/version.c index 7efd4361..24d73f42 100644 --- a/src/version.c +++ b/src/version.c @@ -682,6 +682,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 306, +/**/ 305, /**/ 304, -- 2.11.4.GIT