Mercurial > hg > octave-jordi
changeset 11249:6cd1e62b6616
fix internal sorting in __all_opts__ (bug 31392)
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Sun, 14 Nov 2010 22:01:20 +0100 |
parents | ab1f780b6758 |
children | 830b940e7ff4 |
files | scripts/ChangeLog scripts/optimization/__all_opts__.m |
diffstat | 2 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,8 @@ +2010-11-14 Jaroslav Hajek <highegg@gmail.com> + + * optimization/__all_opts__.m: Ensure that the array is always + case-insensitively sorted. + 2010-11-13 John W. Eaton <jwe@octave.org> * plot/gnuplot_drawnow.m (have_non_legend_axes): New function.
--- a/scripts/optimization/__all_opts__.m +++ b/scripts/optimization/__all_opts__.m @@ -54,10 +54,12 @@ end_try_catch endfor names = unique (names); - lnames = unique (tolower (names)); + [lnames, idx] = unique (tolower (names)); if (length (lnames) < length (names)) ## This is bad. error ("__all_opts__: duplicate options with inconsistent case"); + else + names = names(idx); endif saved_names = names; recursive = false;