From efd03cf9e892d8faade5c2012ebfd6fac02664d4 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 25 Jan 2005 16:40:41 +0000 Subject: 20742: More Unicode conversion stuff. --- Src/Zle/zle_misc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Src/Zle/zle_misc.c') diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c index 5667ba853..86a0137b3 100644 --- a/Src/Zle/zle_misc.c +++ b/Src/Zle/zle_misc.c @@ -358,7 +358,8 @@ yank(UNUSED(char **args)) while (n--) { kct = -1; spaceinline(kctbuf->len); - memcpy((char *)zleline + zlecs, kctbuf->buf, kctbuf->len); + memcpy((char *)(zleline + zlecs), (char *)kctbuf->buf, + kctbuf->len * ZLE_CHAR_SIZE); zlecs += kctbuf->len; yanke = zlecs; } @@ -412,13 +413,13 @@ yankpop(UNUSED(char **args)) * was full, we could loop round and round it, otherwise * we just stopped when we hit the first empty buffer. */ - } while (!buf->buf || !*buf->buf); + } while (!buf->buf || *buf->buf == ZLENUL); zlecs = yankb; foredel(yanke - yankb); cc = buf->len; spaceinline(cc); - memcpy((char *)zleline + zlecs, buf->buf, cc); + memcpy((char *)(zleline + zlecs), (char *)buf->buf, cc * ZLE_CHAR_SIZE); zlecs += cc; yanke = zlecs; return 0; -- cgit 1.4.1