# HG changeset patch # User John W. Eaton # Date 1297452446 18000 # Node ID b03fe57893ae8c91f9a0295c187815d5d5bb2999 # Parent 36ebbc3e82aa6a56dd82b15c343e73a8f091440c 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--;