Mercurial > octave-antonio
changeset 19143:faa6a98f8d4b
fix crash in kron introduced in changeset aa9ca67f09fb
* kron.cc (kron (const PermMatrix& a, const PermMatrix& b)):
Allocate na*nb elements for temporary array.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 21 Sep 2014 16:12:52 -0400 |
parents | b8bd0b55af45 |
children | e99d7a2e7367 |
files | libinterp/corefcn/kron.cc |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/kron.cc Sun Sep 21 16:08:25 2014 -0400 +++ b/libinterp/corefcn/kron.cc Sun Sep 21 16:12:52 2014 -0400 @@ -138,7 +138,7 @@ octave_idx_type nb = b.rows (); const Array<octave_idx_type>& pa = a.col_perm_vec (); const Array<octave_idx_type>& pb = b.col_perm_vec (); - Array<octave_idx_type> res_perm; + Array<octave_idx_type> res_perm (na * nb); octave_idx_type rescol = 0; for (octave_idx_type i = 0; i < na; i++) {