Mercurial > hg > octave-nkf
view test/bug-38565.tst @ 18846:9a6646cc7c3e
Fix load/save to handle up to 2^32-1 elements.
Use std::streamsize in calculations of number of bytes, rather than
octave_idx_type, so that expressions like 8 * nel do not overflow.
* ls-mat4.cc (save_mat_binary_data): Use std::streamsize in calculations of
number of bytes.
* ls-mat5.cc (read_mat5_integer_data, MAT5_DO_WRITE): Use std::streamsize in
calculations of number of bytes.
* data-conv.cc (LS_DO_READ, LS_DO_READ, read_doubles, read_floats,
write_floats): Use std::streamsize in calculations of number of bytes.
author | Rik <rik@octave.org> |
---|---|
date | Sun, 27 Apr 2014 17:38:03 -0700 |
parents | b9e510a1f308 |
children |
line wrap: on
line source
%!function r = f (x) %! if (ischar (x)) %! r = x; %! else %! error ("expecting character string"); %! endif %!endfunction %!assert (eval ("f 10;"), "10");