comparison src/ov-struct.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 7a10410db2c6
children 610bf90fce2a
comparison
equal deleted inserted replaced
9285:226f6d001ee2 9286:c2248cc4821a
261 octave_value retval; 261 octave_value retval;
262 262
263 int n = type.length (); 263 int n = type.length ();
264 264
265 octave_value t_rhs = rhs; 265 octave_value t_rhs = rhs;
266
267 if (idx.front ().empty ())
268 {
269 error ("missing index in indexed assignment");
270 return retval;
271 }
266 272
267 if (n > 1 && ! (type.length () == 2 && type[0] == '(' && type[1] == '.')) 273 if (n > 1 && ! (type.length () == 2 && type[0] == '(' && type[1] == '.'))
268 { 274 {
269 switch (type[0]) 275 switch (type[0])
270 { 276 {