Mercurial > hg > octave-nkf
changeset 18397:b522d04382cf stable
Return all nargout from urlread if requested (bug #41260).
* urlwrite.cc (Furlread): Assign all outputs to retval when nargout > 0.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 22 Jan 2014 10:37:35 -0800 |
parents | f59459404f55 |
children | 200851c87444 |
files | libinterp/corefcn/urlwrite.cc |
diffstat | 1 files changed, 5 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/urlwrite.cc +++ b/libinterp/corefcn/urlwrite.cc @@ -554,15 +554,12 @@ { curl.http_action (param, method); - if (curl.good ()) + if (nargout > 0) { - if (nargout > 0) - { - // Return empty string if no error occured. - retval(2) = curl.good () ? "" : curl.lasterror (); - retval(1) = curl.good (); - retval(0) = buf.str (); - } + // Return empty string if no error occured. + retval(2) = curl.good () ? "" : curl.lasterror (); + retval(1) = curl.good (); + retval(0) = buf.str (); } if (nargout < 2 && ! curl.good ())