From ffc43362bc96dc767f3c25f428783009018a46c7 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Thu, 24 Aug 2000 23:18:08 +0000 Subject: Fix an off by one error that was causing crashes. 2000-08-24 Christopher James Lahey * e-table.c: Fix an off by one error that was causing crashes. svn path=/trunk/; revision=5027 --- widgets/table/e-table.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'widgets/table/e-table.c') diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 26cb1504b9..7906ad877d 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -407,6 +407,7 @@ et_table_cell_changed (ETableModel *table_model, int view_col, int row, ETable * static void et_table_row_inserted (ETableModel *table_model, int row, ETable *et) { + /* This number has already been decremented. */ int row_count = e_table_model_row_count(table_model); if (!et->need_rebuild) { if (row != row_count - 1) @@ -421,7 +422,7 @@ et_table_row_deleted (ETableModel *table_model, int row, ETable *et) int row_count = e_table_model_row_count(table_model); if (!et->need_rebuild) { e_table_group_remove (et->group, row); - if (row != row_count - 1) + if (row != row_count) e_table_group_decrement(et->group, row, 1); } } -- cgit