diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2001-12-18 09:16:17 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2001-12-18 09:16:17 +0000 |
commit | 68d739c67a10db0b97b0efaaa730f71bf47f4ab5 (patch) | |
tree | 985975786e5a239bd926873fa665253df5ff8523 /Src | |
parent | 0db3827ce271b3d334d1c040636e144ca5cf9fa1 (diff) | |
download | zsh-68d739c67a10db0b97b0efaaa730f71bf47f4ab5.tar.gz zsh-68d739c67a10db0b97b0efaaa730f71bf47f4ab5.tar.xz zsh-68d739c67a10db0b97b0efaaa730f71bf47f4ab5.zip |
small fix to += code from 16353
Diffstat (limited to 'Src')
-rw-r--r-- | Src/params.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Src/params.c b/Src/params.c index 6fb5da57f..35f699033 100644 --- a/Src/params.c +++ b/Src/params.c @@ -1879,7 +1879,7 @@ assignsparam(char *s, char *val, int augment) Value v; char *t = s; char *ss, *copy, *var; - size_t lv; + size_t lvar; mnumber lhs, rhs; int sstart; @@ -1975,10 +1975,10 @@ assignsparam(char *s, char *val, int augment) var = getstrvalue(v); v->start = sstart; copy = val; - lv = strlen(var); - val = (char *)zalloc(lv + strlen(var)); + lvar = strlen(var); + val = (char *)zalloc(lvar + strlen(val) + 1); strcpy(val, var); - strcpy(val + lv, copy); + strcpy(val + lvar, copy); zsfree(copy); break; } |