Mercurial > hg > octave-lojdl
changeset 12896:a19b50f6697f stable
Correctly allow single string input form of fopen() (Bug #33535).
* file-io.cc (fopen): Correct nargout check when distinguishing between
input filename and special input keyword "all".
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Wed, 27 Jul 2011 16:05:32 -0700 |
parents | ef5ebbf2a657 |
children | c68fe26745ae |
files | src/file-io.cc |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/file-io.cc +++ b/src/file-io.cc @@ -666,14 +666,14 @@ if (nargin == 1) { - if (nargout < 2 && args(0).is_string ()) + if (args(0).is_string ()) { // If there is only one argument and it is a string but it // is not the string "all", we assume it is a file to open // with MODE = "r". To open a file called "all", you have // to supply more than one argument. - if (args(0).string_value () == "all") + if (nargout < 2 && args(0).string_value () == "all") return octave_stream_list::open_file_numbers (); } else