1
0
Fork 0
mirror of https://github.com/pygos/init.git synced 2024-11-25 04:20:42 +01:00

Fix parameter substitution escape of '%'

Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
David Oberhollenzer 2018-10-20 17:40:45 +02:00
parent ef51a8e06f
commit 24e98f1e5b

View file

@ -125,6 +125,9 @@ static void substitute(rdline_t *t, char *dst, char *src)
src += 2; src += 2;
while (*dst != '\0') while (*dst != '\0')
++dst; ++dst;
} else if (src[0] == '%' && src[1] == '%') {
*(dst++) = '%';
src += 2;
} else { } else {
if (*src == '"') if (*src == '"')
string = !string; string = !string;