# HG changeset patch # User John W. Eaton # Date 1297452446 18000 # Node ID ab4c6bbff14ae39db182df9135a57d0ee34b4867 # Parent a754c2d8a13fa8b59db4ef4a062daa9bf6aae5fd use correct type for std::string length diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-02-11 John W. Eaton + + * load-path.cc (strip_trailing_separators): Declare K as size_t + rather than octave_idx_type. + 2011-02-10 John W. Eaton * DLD-FUNCTIONS/regexp.cc (octregexp_list): Avoid deprecated diff --git a/src/load-path.cc b/src/load-path.cc --- a/src/load-path.cc +++ b/src/load-path.cc @@ -613,7 +613,8 @@ { std::string dir = dir_arg; - octave_idx_type k = dir.length (); + size_t k = dir.length (); + while (k > 1 && file_ops::is_dir_sep (dir[k-1])) k--;