diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2005-03-04 21:34:28 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2005-03-04 21:34:28 +0000 |
commit | d4c948bdd024ca7d9de692696bd5a3c716aed12d (patch) | |
tree | b179c204ee12c6c0a12080d0c6265285f3999a22 | |
parent | b7ab36d9f69d74e18069cf6d0b41de232e0b2e20 (diff) | |
download | zsh-d4c948bdd024ca7d9de692696bd5a3c716aed12d.tar.gz zsh-d4c948bdd024ca7d9de692696bd5a3c716aed12d.tar.xz zsh-d4c948bdd024ca7d9de692696bd5a3c716aed12d.zip |
20928: null terminate screen lines in zle_refresh.c
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/Zle/zle_refresh.c | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog index 4cc6bb473..d6caea956 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-03-04 Peter Stephenson <pws@pwstephenson.fsnet.co.uk> + + * 20928: Src/Zle/zle_refresh.c: null terminate lines so that they + can be compared reliably. + 2005-03-04 Motoi Washida <a66@h8.dion.ne.jp> * unposted: Completion/Darwin/Command/_softwareupdate: new completion diff --git a/Src/Zle/zle_refresh.c b/Src/Zle/zle_refresh.c index 0915254c5..38e6a38e8 100644 --- a/Src/Zle/zle_refresh.c +++ b/Src/Zle/zle_refresh.c @@ -191,9 +191,15 @@ resetvideo(void) } for (ln = 0; ln != winh + 1; ln++) { if (nbuf[ln]) - *nbuf[ln] = ZWC('\n'); + { + nbuf[ln][0] = ZWC('\n'); + nbuf[ln][1] = ZWC('\0'); + } if (obuf[ln]) - *obuf[ln] = ZWC('\n'); + { + obuf[ln][0] = ZWC('\n'); + obuf[ln][0] = ZWC('\0'); + } } /* TODO currently zsh core is not using widechars */ |