diff src/ov-cell.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 978c863bc8e5
children 650c7efa7234
line wrap: on
line diff
--- a/src/ov-cell.cc	Tue Jun 02 09:06:49 2009 +0200
+++ b/src/ov-cell.cc	Tue Jun 02 09:57:44 2009 +0200
@@ -216,6 +216,12 @@
 
   clear_cellstr_cache ();
 
+  if (idx.front ().empty ())
+    {
+      error ("missing index in indexed assignment");
+      return retval;
+    }
+
   if (n > 1)
     {
       switch (type[0])