Mercurial > hg > octave-nkf
changeset 4520:7843dfef8dd0
[project @ 2003-09-26 20:34:13 by jwe]
author | jwe |
---|---|
date | Fri, 26 Sep 2003 20:34:13 +0000 |
parents | 8e1c04e506ce |
children | e25f701e9632 |
files | src/ChangeLog src/load-save.cc |
diffstat | 2 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-09-26 John W. Eaton <jwe@bevo.che.wisc.edu> + + * load-save.cc (read_mat5_binary_element): Return early if the + miMATRIX element has length zero. + 2003-09-24 John W. Eaton <jwe@bevo.che.wisc.edu> * ov-cell.cc (octave_cell::subsasgn): Also attempt empty
--- a/src/load-save.cc +++ b/src/load-save.cc @@ -2600,6 +2600,8 @@ TWO_BYTE_INT number; number = *(TWO_BYTE_INT *)"\x00\x01"; + global = false; + // MAT files always use IEEE floating point if ((number == 1) ^ swap) flt_fmt = oct_mach_info::ieee_big_endian; @@ -2615,6 +2617,13 @@ error ("load: invalid element type"); goto early_read_error; } + + if (element_length == 0) + { + tc = Matrix (); + return retval; + } + pos = is.tellg (); // array flags subelement