[dia/dia-0-97] Bug 676830 : Misc - Grid : don't crash on copy, resize



commit b9b279e8bd77e0fb27176d64baa75563054ac5e1
Author: Hans Breuer <hans breuer org>
Date:   Sat Jun 23 15:21:58 2012 +0200

    Bug 676830 : Misc - Grid : don't crash on copy, resize
    
    Row index was iterated with the columns range.

 objects/Misc/grid_object.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/objects/Misc/grid_object.c b/objects/Misc/grid_object.c
index bf6537a..05d1b16 100644
--- a/objects/Misc/grid_object.c
+++ b/objects/Misc/grid_object.c
@@ -479,7 +479,7 @@ grid_object_reallocate_cells (Grid_Object* grid_object)
 
   /* implicit: if (new_cols < old_cols) */
   for (i = new_cols; i < old_cols; ++i)
-    for (j = 0; j < old_cols && j < new_cols; ++j) /* don't double-delete */
+    for (j = 0; j < old_rows && j < new_rows; ++j) /* don't double-delete */
     {
       int cell = grid_cell(i, j, old_rows, old_cols);
       object_remove_connections_to(&grid_object->cells[cell]);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]