diff liboctave/idx-vector.cc @ 852:e4b2cd2ad0a2

[project @ 1994-10-21 04:19:04 by jwe]
author jwe
date Fri, 21 Oct 1994 04:19:04 +0000
parents a01a9db8ab69
children ba6acc6309ec
line wrap: on
line diff
--- a/liboctave/idx-vector.cc
+++ b/liboctave/idx-vector.cc
@@ -225,6 +225,12 @@
       initialized = 0;
       return;
     }
+  else if (max_val >= z_len)
+    {
+      ::error ("%s index %d out of range", rc, max_val+1);
+      initialized = 0;
+      return;
+    }
 
   initialized = 1;
 }