Mercurial > hg > octave-jordi
diff libinterp/corefcn/urlwrite.cc @ 18328: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 (2014-01-22) |
parents | 9a43d8d6e29e |
children | af04b9d9f7ed |
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 ())