# HG changeset patch # User jwe # Date 1131390741 0 # Node ID ad2e70544c77618d00613f1240515cfddbed19f9 # Parent 6f29a563b9764596c8f62331eaa9a6f41eeea576 [project @ 2005-11-07 19:12:21 by jwe] diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,6 +1,7 @@ 2005-11-07 John W. Eaton - * strfns.cc (Fstrcmp): Initialize retval to false. + * strfns.cc (Fstrcmp): If args are not strings or cell arrays of + strings, return false. 2005-11-01 John W. Eaton diff --git a/src/strfns.cc b/src/strfns.cc --- a/src/strfns.cc +++ b/src/strfns.cc @@ -154,7 +154,7 @@ just the opposite of the corresponding C library function.\n\ @end deftypefn") { - octave_value retval = false; + octave_value retval; if (args.length () == 2) { @@ -356,6 +356,8 @@ retval = output; } + else + retval = false; } else print_usage ("strcmp");