1
0
Fork 0
mirror of https://github.com/pygos/init.git synced 2024-05-18 03:36:13 +02: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;
while (*dst != '\0')
++dst;
} else if (src[0] == '%' && src[1] == '%') {
*(dst++) = '%';
src += 2;
} else {
if (*src == '"')
string = !string;