grid: repair grid_row_in_view(): use 'view', not 'offset'

This commit is contained in:
Daniel Eklöf 2019-07-10 16:35:52 +02:00
parent 1ff1b3a71e
commit 132749b1ed
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

2
grid.h
View file

@ -28,7 +28,7 @@ grid_row_in_view(struct grid *grid, int row_no)
{
assert(grid->view >= 0);
int real_row = (grid->offset + row_no + grid->num_rows) % grid->num_rows;
int real_row = (grid->view + row_no + grid->num_rows) % grid->num_rows;
struct row *row = grid->rows[real_row];
assert(row != NULL);