Mercurial > octave
changeset 21552:102b33b53ea4
textscan: Use correct delimiters for file buffering (bug #47539)
* oct-stream.cc (textscan::do_scan): Pass only value of delimiters or
whitespace, not both.
author | Lachlan Andrew <lachlanbis@gmail.com> |
---|---|
date | Mon, 28 Mar 2016 20:00:37 +1100 |
parents | 990c6c31a684 |
children | f80b46f7d3d8 |
files | libinterp/corefcn/oct-stream.cc |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/oct-stream.cc Sat Mar 26 18:14:31 2016 +1100 +++ b/libinterp/corefcn/oct-stream.cc Mon Mar 28 20:00:37 2016 +1100 @@ -2593,7 +2593,9 @@ buf_size = std::max (buf_size, ntimes); } // Finally, create the stream. - delimited_stream is (isp, whitespace + delims, max_lookahead, buf_size); + delimited_stream is (isp, + (delim_table.empty () ? whitespace + "\r\n" : delims), + max_lookahead, buf_size); // Grow retval dynamically. "size" is half the initial size // (FIXME -- Should we start smaller if ntimes is large?)