# HG changeset patch # User jwe # Date 949446068 0 # Node ID 9118c2a3bc79ba8c3035373279c1b3401c15cd51 # Parent f84c0b63b3dfe42ad96084ee30e17567e170c744 [project @ 2000-02-01 23:01:07 by jwe] diff --git a/liboctave/ChangeLog b/liboctave/ChangeLog --- a/liboctave/ChangeLog +++ b/liboctave/ChangeLog @@ -1,5 +1,9 @@ 2000-02-01 John W. Eaton + * oct-env.cc (octave_env::do_polite_directory_format): + Use operator== and substr method to do limited-length string + comparison. + * Array2-idx.h, Array-idx.h: Avoid shadowing warnings for idx. * Quad.h: Use do_integrate as name of pure virtual function. diff --git a/liboctave/oct-env.cc b/liboctave/oct-env.cc --- a/liboctave/oct-env.cc +++ b/liboctave/oct-env.cc @@ -216,7 +216,7 @@ size_t len = home_dir.length (); - if (len > 1 && home_dir.compare (name, 0, len) == 0 + if (len > 1 && home_dir == name.substr (0, len) && (name.length () == len || name[len] == '/')) { retval = "~";