Implemented the find dialog.
[pspp-builds.git] / src / data / datasheet.c
index 971144cb2305981646b346bd90effa07a5afcf27..f76b1908d50f1dbdeeff94af7f9d6ecd2150ca16 100644 (file)
@@ -354,6 +354,8 @@ datasheet_delete_columns (struct datasheet *ds, size_t start, size_t cnt)
 {
   size_t lcol;
 
+  assert ( start + cnt <= axis_get_size (ds->columns) );
+
   /* Free up columns for reuse. */
   for (lcol = start; lcol < start + cnt; lcol++)
     {
@@ -426,6 +428,7 @@ bool
 datasheet_get_value (const struct datasheet *ds, casenumber row, size_t column,
                      union value *value, int width)
 {
+  assert ( row >= 0 );
   return rw_case ((struct datasheet *) ds,
                   OP_READ, row, column, value_cnt_from_width (width), value);
 }