Mercurial > hg > octave-nkf
changeset 2687:3e611118ce15
[project @ 1997-02-14 23:37:36 by jwe]
author | jwe |
---|---|
date | Fri, 14 Feb 1997 23:37:37 +0000 |
parents | 6d0a6fc92f06 |
children | fe5e83216458 |
files | src/ChangeLog src/oct-stream.cc |
diffstat | 2 files changed, 26 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,8 @@ Fri Feb 14 16:23:30 1997 John W. Eaton <jwe@bevo.che.wisc.edu> + * oct-stream.cc (octave_base_stream::do_scanf): Don't forget to + check to see if the result matrix needs resizing! + * Makefile.in (bin-dist): Don't write empty strings to LIBRARIES. Thu Feb 13 03:02:08 1997 John W. Eaton <jwe@bevo.che.wisc.edu>
--- a/src/oct-stream.cc +++ b/src/oct-stream.cc @@ -961,12 +961,30 @@ { if (elt) { - if (nr > 0 && nc > 0 && count == max_size) + if (count == max_size) { - final_nr = nr; - final_nc = nc; - - break; + if (nr > 0) + { + if (nc > 0) + { + final_nr = nr; + final_nc = nc; + + break; + } + else + { + max_size *= 2; + mval.resize (nr, max_size / nr, 0.0); + data = mval.fortran_vec (); + } + } + else + { + max_size *=2; + mval.resize (max_size, 1, 0.0); + data = mval.fortran_vec (); + } } const char *fmt = elt->text;