diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2005-01-25 16:40:41 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2005-01-25 16:40:41 +0000 |
commit | efd03cf9e892d8faade5c2012ebfd6fac02664d4 (patch) | |
tree | d7b418fac53d0cbb76e538150a734a75b7784746 /Src/Zle/zle_misc.c | |
parent | b80c6b0863127da4511abf2ebb1f9328db5730aa (diff) | |
download | zsh-efd03cf9e892d8faade5c2012ebfd6fac02664d4.tar.gz zsh-efd03cf9e892d8faade5c2012ebfd6fac02664d4.tar.xz zsh-efd03cf9e892d8faade5c2012ebfd6fac02664d4.zip |
20742: More Unicode conversion stuff.
Diffstat (limited to 'Src/Zle/zle_misc.c')
-rw-r--r-- | Src/Zle/zle_misc.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; |