Mercurial > octave-nkf
changeset 16303:085976d9ef08
Fix saving names >31 characters to -v6 format (bug #34676)
* libinterp/interp-core/ls-mat5.cc(save_mat5_element_length,
save_mat5_binary_element): Use max_namelen of 63.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 14 Mar 2013 10:25:23 -0700 |
parents | a4af67e0d22c |
children | c8e1b0213e34 |
files | libinterp/interp-core/ls-mat5.cc |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/interp-core/ls-mat5.cc Thu Mar 14 03:48:47 2013 -0600 +++ b/libinterp/interp-core/ls-mat5.cc Thu Mar 14 10:25:23 2013 -0700 @@ -2102,7 +2102,7 @@ save_mat5_element_length (const octave_value& tc, const std::string& name, bool save_as_floats, bool mat7_format) { - size_t max_namelen = (mat7_format ? 63 : 31); + size_t max_namelen = 63; size_t len = name.length (); std::string cname = tc.class_name (); int ret = 32; @@ -2286,7 +2286,7 @@ int32_t flags = 0; int32_t nnz_32 = 0; std::string cname = tc.class_name (); - size_t max_namelen = (mat7_format ? 63 : 31); + size_t max_namelen = 63; dim_vector dv = tc.dims (); int nd = tc.ndims (); @@ -2456,7 +2456,7 @@ size_t namelen = name.length (); if (namelen > max_namelen) - namelen = max_namelen; // only 31 or 63 char names permitted in mat file + namelen = max_namelen; // Truncate names if necessary int paddedlength = PAD (namelen); @@ -2634,7 +2634,7 @@ size_t namelen = classname.length (); if (namelen > max_namelen) - namelen = max_namelen; // only 31 or 63 char names permitted + namelen = max_namelen; // Truncate names if necessary int paddedlength = PAD (namelen);