diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-01-04 19:42:45 +0000 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2015-01-04 19:42:45 +0000 |
commit | 98f465c09f6edc56e8332de42fddee9b689b2ed6 (patch) | |
tree | b430a733b3c042d3829ba6e6ba819b5b0cf48f36 /Src | |
parent | f9cba834cdcd5f35d21768b6412577236adc5ed2 (diff) | |
download | zsh-98f465c09f6edc56e8332de42fddee9b689b2ed6.tar.gz zsh-98f465c09f6edc56e8332de42fddee9b689b2ed6.tar.xz zsh-98f465c09f6edc56e8332de42fddee9b689b2ed6.zip |
34092: fix miscount of symlink resolution for "..".
This caused problems with expanding a path with ".." in "whence -S".
Diffstat (limited to 'Src')
-rw-r--r-- | Src/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/utils.c b/Src/utils.c index 959df9ab7..390f513ba 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -741,6 +741,8 @@ xsymlinks(char *s, int full) while (*--p != '/') xbuflen--; *p = '\0'; + /* The \0 isn't included in the length */ + xbuflen--; continue; } sprintf(xbuf2, "%s/%s", xbuf, *pp); |