Mercurial > octave-nkf
diff src/ov-base.cc @ 9286:c2248cc4821a
don't crash on assignments like a() = 1
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 02 Jun 2009 09:57:44 +0200 |
parents | d8f9588c6ba1 |
children | 67fc970dad7d |
line wrap: on
line diff
--- a/src/ov-base.cc Tue Jun 02 09:06:49 2009 +0200 +++ b/src/ov-base.cc Tue Jun 02 09:57:44 2009 +0200 @@ -1203,6 +1203,12 @@ { octave_value retval; + if (idx.front ().empty ()) + { + error ("missing index in indexed assignment"); + return retval; + } + int t_lhs = type_id (); int t_rhs = rhs.type_id ();