summaryrefslogtreecommitdiff
path: root/Src/utils.c
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2011-12-14 01:30:08 +0100
committerAxel Beckert <abe@deuxchevaux.org>2011-12-14 01:31:10 +0100
commit3e739c6befbab45a3b6e460b5ce26ac0359155ec (patch)
tree0cc28cfd413d9f2a3c5c13da83606f2829e641ba /Src/utils.c
parent00f335b142707b7f9e3531714b7a3bf5b377dcc1 (diff)
parent79f2f7fa2ce18552869afa33f1d0d42cf4191b04 (diff)
downloadzsh-3e739c6befbab45a3b6e460b5ce26ac0359155ec.tar.gz
zsh-3e739c6befbab45a3b6e460b5ce26ac0359155ec.zip
Merge commit 'zsh-4.3.14' into debian
Diffstat (limited to 'Src/utils.c')
-rw-r--r--Src/utils.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 6c2ea98d5..014cb2fa2 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -3959,7 +3959,7 @@ metafy(char *buf, int len, int heap)
if (imeta(*e++))
meta++;
- if (meta || heap == META_DUP || heap == META_HEAPDUP) {
+ if (meta || heap == META_DUP || heap == META_HEAPDUP || *e != '\0') {
switch (heap) {
case META_REALLOC:
buf = zrealloc(buf, len + meta + 1);
@@ -4002,8 +4002,8 @@ metafy(char *buf, int len, int heap)
meta--;
}
}
+ *e = '\0';
}
- *e = '\0';
return buf;
}