Mercurial > hg > octave-terminal
changeset 4412:34438519fac3
[project @ 2003-05-14 22:23:37 by jwe]
author | jwe |
---|---|
date | Wed, 14 May 2003 22:23:37 +0000 |
parents | cd14ff360ec8 |
children | 2de7c7452a1e |
files | liboctave/ChangeLog liboctave/kpse.cc |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,3 +1,9 @@ +2003-05-14 John W. Eaton <jwe@bevo.che.wisc.edu> + + * kpse.cc (kpse_path_iterator::next): Skip consecutive colons here. + (kpse_path_iterator::set_end): Don't miss last element when not + followed by a colon. + 2003-05-11 John W. Eaton <jwe@bevo.che.wisc.edu> * Array-idx.h (Array<T>::index): Fix off-by-one error.
--- a/liboctave/kpse.cc +++ b/liboctave/kpse.cc @@ -545,7 +545,9 @@ { e = b + 1; - if (e >= len) + if (e == len) + ; /* OK, we have found the last element. */ + else if (e > len) b = e = NPOS; else { @@ -562,6 +564,10 @@ { b = e + 1; + /* Skip any consecutive colons. */ + while (kpse_is_env_sep (path[b]) && b < len) + b++; + if (b >= len) b = e = NPOS; else