Bugfix: Boundary checking for current_row and current_col when shrinking table
This commit is contained in:
parent
aea8cb9c25
commit
248b2e27b9
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue