grid: add TODO, and an assert, that sixels must not cross wrap-around

This commit is contained in:
Daniel Eklöf 2020-06-27 15:34:54 +02:00
parent 1915e53629
commit 644c8ef879
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

4
grid.c
View file

@ -123,6 +123,10 @@ grid_reflow(struct grid *grid, int new_rows, int new_cols,
struct sixel six = it->item;
six.pos.row = new_row_idx;
/* TODO: ensure sixels don't span across the wrap-around */
int end __attribute__((unused)) = (six.pos.row + six.rows - 1) & (new_rows - 1);
assert(end >= six.pos.row);
tll_push_back(new_sixels, six);
tll_remove(grid->sixel_images, it);
}