summaryrefslogtreecommitdiff
path: root/Src/hist.c
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2005-01-22 04:03:05 +0000
committerClint Adams <clint@users.sourceforge.net>2005-01-22 04:03:05 +0000
commit0038b1a68265a2c8136f90d63fae15a121b9341c (patch)
treed1fd810bcf817cf9fa04da712bf304b33a6fc4e6 /Src/hist.c
parentd94e9817cec2b0c2fd692fd839f77f376309008a (diff)
downloadzsh-0038b1a68265a2c8136f90d63fae15a121b9341c.tar.gz
zsh-0038b1a68265a2c8136f90d63fae15a121b9341c.zip
* 2073x: Src/Zle/zle_utils.c, Src/hist.c: modify zlegetline() and zlegetline
caller so that the octet-based and wide-character versions should return the same string.
Diffstat (limited to 'Src/hist.c')
-rw-r--r--Src/hist.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/hist.c b/Src/hist.c
index 33c5ccfd9..0a557a3cd 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -2260,7 +2260,7 @@ bufferwords(LinkList list, char *buf, int *index)
if (zlegetlineptr) {
linein = zlegetlineptr(&ll, &cs);
} else {
- linein = "";
+ linein = ztrdup("");
ll = cs = 0;
}
zlell = ll + 1; /* length of line plus space added below */
@@ -2287,6 +2287,7 @@ bufferwords(LinkList list, char *buf, int *index)
p[zlell] = '\0';
inpush(p, 0, NULL);
}
+ zsfree(linein);
}
if (zlecs)
zlecs--;