aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-08-25 07:18:08 +0800
committerChris Lahey <clahey@src.gnome.org>2000-08-25 07:18:08 +0800
commitffc43362bc96dc767f3c25f428783009018a46c7 (patch)
tree0010a2d859cba72a92da062fe937e4839ab79cb4 /widgets/table/e-table.c
parentc99edac0b5c58ba083a668a7de97409151768319 (diff)
downloadgsoc2013-evolution-ffc43362bc96dc767f3c25f428783009018a46c7.tar.gz
gsoc2013-evolution-ffc43362bc96dc767f3c25f428783009018a46c7.tar.zst
gsoc2013-evolution-ffc43362bc96dc767f3c25f428783009018a46c7.zip
Fix an off by one error that was causing crashes.
2000-08-24 Christopher James Lahey <clahey@helixcode.com> * e-table.c: Fix an off by one error that was causing crashes. svn path=/trunk/; revision=5027
Diffstat (limited to 'widgets/table/e-table.c')
-rw-r--r--widgets/table/e-table.c3
1 files changed, 2 insertions, 1 deletions
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);
}
}