Message ID | 20190225060031.x5ckegfrskba6zrc@gondor.apana.org.au (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Herbert Xu |
Headers | show |
Series | expand: Fix double-decrement in argstr | expand |
diff --git a/src/expand.c b/src/expand.c index af9cac9..e57efa6 100644 --- a/src/expand.c +++ b/src/expand.c @@ -285,7 +285,7 @@ start: q = stnputs(p, length, expdest); q[-1] &= end - 1; expdest = q - (flag & EXP_WORD ? end : 0); - newloc = expdest - (char *)stackblock() - end; + newloc = q - (char *)stackblock() - end; if (breakall && !inquotes && newloc > startloc) { recordregion(startloc, newloc, 0); }