Mercurial > octave-nkf
changeset 15567:e05eafe7105a
Print an error message if save() called with unrecognized option (bug #37502)
* load-save.cc(parse_save_options): Add extra clause at end of option processing
to report an error if a save argument starts with '-' and has not been decoded.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 30 Oct 2012 08:16:30 -0700 |
parents | ab1c6e6d1be6 |
children | 38e64d9f0fda |
files | libinterp/interpfcn/load-save.cc |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/interpfcn/load-save.cc Sun Oct 28 21:48:02 2012 -0700 +++ b/libinterp/interpfcn/load-save.cc Tue Oct 30 08:16:30 2012 -0700 @@ -1121,6 +1121,10 @@ use_zlib = true; } #endif + else if (argv[i][0] == '-') + { + error ("save: Unrecognized option '%s'", argv[i].c_str ()); + } else retval.append (argv[i]); }