diff options
author | Bart Schaefer <barts@users.sourceforge.net> | 2013-01-08 07:18:50 +0000 |
---|---|---|
committer | Bart Schaefer <barts@users.sourceforge.net> | 2013-01-08 07:18:50 +0000 |
commit | 3ed9e4d1b9bc97a577df3d9679959ad7e839cd9d (patch) | |
tree | 5d172c1f4ccd57ee0a650202d97a842622e5365a | |
parent | dda51b9dbbfa6b3f7b8b99124b0a2a504521eb2c (diff) | |
download | zsh-3ed9e4d1b9bc97a577df3d9679959ad7e839cd9d.tar.gz zsh-3ed9e4d1b9bc97a577df3d9679959ad7e839cd9d.tar.xz zsh-3ed9e4d1b9bc97a577df3d9679959ad7e839cd9d.zip |
unposted: tweak 30949 to fix buffer pointer
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Src/builtin.c | 3 |
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 14ff3458b..9a3c20ecc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-01-07 Bart Schaefer <schaefer@zsh.org> + + * unposted (see 30952): Src/builtin.c: tweak to 30949 to fix the + buffer pointer. + 2013-01-06 Bart Schaefer <schaefer@zsh.org> * 30949: Src/builtin.c: restore "read -q" behavior lost by 27188. @@ -435,5 +440,5 @@ ***************************************************** * This is used by the shell to define $ZSH_PATCHLEVEL -* $Revision: 1.5783 $ +* $Revision: 1.5784 $ ***************************************************** diff --git a/Src/builtin.c b/Src/builtin.c index f5c727f47..f13167f33 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -5491,8 +5491,7 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func)) else eof = (bptr - buf != 1 || (buf[0] != 'y' && buf[0] != 'Y')); buf[0] = eof ? 'n' : 'y'; - buf[1] = 0; - bptr = buf+2; + bptr = buf + 1; } if (OPT_ISSET(ops,'e') || OPT_ISSET(ops,'E')) fwrite(buf, bptr - buf, 1, stdout); |