|
() should just give a error but goes to panic:: msg#00024gnu.octave.bugs
On 19-Apr-2005, Etienne de Foras <e_deforas@xxxxxxxx> wrote: | Hello, | | Just a bug: | | u=rand(10,10); | u()=0 gives an error => ok. | | u=rand(10,10,10); (ND-Matrix) | u()=0 hangs up and return to prompt, normal feeling? | | Thanks and See you. | | version=2.1.67 Please try the following patch. Thanks, jwe liboctave/ChangeLog: 2005-04-19 John W. Eaton <jwe@xxxxxxxxxx> * Array.cc (assignN): Don't crash if the index list is empty. Index: liboctave/Array.cc =================================================================== RCS file: /usr/local/cvsroot/octave/liboctave/Array.cc,v retrieving revision 1.124.2.3 diff -u -r1.124.2.3 Array.cc --- liboctave/Array.cc 1 Apr 2005 18:22:47 -0000 1.124.2.3 +++ liboctave/Array.cc 19 Apr 2005 14:44:17 -0000 @@ -2899,6 +2899,13 @@ { lhs.maybe_delete_elements (idx, rfv); } + else if (n_idx == 0) + { + (*current_liboctave_error_handler) + ("invalid number of indices for matrix expression"); + + retval = 0; + } else if (n_idx == 1) { idx_vector iidx = idx(0); ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html ------------------------------------------------------------- |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | () should just give a error but goes to panic:: 00024, Etienne de Foras |
|---|---|
| Next by Date: | Re: can't load HDF5 files: 00024, Nuno Nunes |
| Previous by Thread: | () should just give a error but goes to panic:i: 00024, Etienne de Foras |
| Next by Thread: | __gnuplot_replot__ fails in octave-2.1.69: 00024, Joe Koski |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |