Message ID | ZnbBSnDM7aGUAb5L@gondor.apana.org.au (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
Series | expand: Fix leading white space regression in ifsbreakup | expand |
diff --git a/src/expand.c b/src/expand.c index 6912e39..5285b79 100644 --- a/src/expand.c +++ b/src/expand.c @@ -1282,7 +1282,7 @@ static char *ifsbreakup_slow(struct ifs_state *ifst, struct arglist *arglist, /* Ignore IFS whitespace at start */ if (q == ifst->start && ifsspc) { ifst->start = p; - return p; + goto out_zero_ifsspc; } if (ifst->maxargs > 0 && !--ifst->maxargs) { ifst->r = q; @@ -1297,6 +1297,7 @@ static char *ifsbreakup_slow(struct ifs_state *ifst, struct arglist *arglist, return p; } +out_zero_ifsspc: ifst->ifsspc = 0; return p; }