diff options
Diffstat (limited to 'bin/sh/expand.c')
-rw-r--r-- | bin/sh/expand.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c index 8a6f03a..074b32a 100644 --- a/bin/sh/expand.c +++ b/bin/sh/expand.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)expand.c 8.5 (Berkeley) 5/15/95"; #endif static const char rcsid[] = - "$Id: expand.c,v 1.24 1998/09/13 19:24:57 tegge Exp $"; + "$Id: expand.c,v 1.25 1999/04/09 15:23:48 tegge Exp $"; #endif /* not lint */ #include <sys/types.h> @@ -646,7 +646,7 @@ evalvar(p, flag) int varflags; char *var; char *val; - char *pat; + int patloc; int c; int set; int special; @@ -744,10 +744,10 @@ record: * right after it */ STPUTC('\0', expdest); - pat = expdest; - if (subevalvar(p, NULL, expdest - stackblock(), subtype, + patloc = expdest - stackblock(); + if (subevalvar(p, NULL, patloc, subtype, startloc, varflags) == 0) { - int amount = (expdest - pat) + 1; + int amount = (expdest - stackblock() - patloc) + 1; STADJUST(-amount, expdest); } /* Remove any recorded regions beyond start of variable */ |