From: Fredrik Tolf Date: Wed, 5 Aug 2015 23:50:08 +0000 (+0200) Subject: lib: Fixed minor bug in expandargs. X-Git-Url: http://www.dolda2000.com/gitweb/?p=ashd.git;a=commitdiff_plain;h=832efc978604c4779db85540e3c9c8ee8898d8c9 lib: Fixed minor bug in expandargs. --- diff --git a/lib/cf.c b/lib/cf.c index 9d3fb76..b809d33 100644 --- a/lib/cf.c +++ b/lib/cf.c @@ -328,8 +328,10 @@ static char **expandargs(struct stdchild *sd) for(p2 = sd->argv[i]; p != NULL; p2 = np, p = strchr(np, '$')) { bufcat(exp, p2, p - p2); if(p[1] == '{') { - if((p3 = strchr((p += 2), '}')) == NULL) + if((p3 = strchr((p += 2), '}')) == NULL) { + np = p; break; + } np = p3 + 1; } else { for(p3 = ++p; *p3; p3++) {