Bugfix: Boundary checking for current_row and current_col when shrinking table

This commit is contained in:
Michael Stapelberg 2009-02-26 22:23:41 +01:00
parent aea8cb9c25
commit 248b2e27b9
1 changed files with 7 additions and 0 deletions

View File

@ -160,4 +160,11 @@ void cleanup_table(Workspace *workspace) {
shrink_table_rows(workspace); shrink_table_rows(workspace);
} else rows++; } else rows++;
} }
/* Boundary checking for current_col and current_row */
if (current_col >= c_ws->cols)
current_col = c_ws->cols-1;
if (current_row >= c_ws->rows)
current_row = c_ws->rows-1;
} }