summaryrefslogtreecommitdiffstats
path: root/grid.c
diff options
context:
space:
mode:
authornicm <nicm>2019-03-18 15:25:36 +0000
committernicm <nicm>2019-03-18 15:25:36 +0000
commitd738d5168804405240a3f36b6f410baee39cd9e0 (patch)
treec7459e790d1efb2a82a4078ad2b16af08e7d0399 /grid.c
parent2628af573d98f7bdd4db02c7a80c860b867a45fb (diff)
Mode init needs to be fired with the mode on the list or it will not be
resized correctly.
Diffstat (limited to 'grid.c')
-rw-r--r--grid.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/grid.c b/grid.c
index 2ca4e6c5..c63287bd 100644
--- a/grid.c
+++ b/grid.c
@@ -481,11 +481,10 @@ void
grid_get_cell(struct grid *gd, u_int px, u_int py, struct grid_cell *gc)
{
if (grid_check_y(gd, __func__, py) != 0 ||
- px >= gd->linedata[py].cellsize) {
+ px >= gd->linedata[py].cellsize)
memcpy(gc, &grid_default_cell, sizeof *gc);
- return;
- }
- return (grid_get_cell1(&gd->linedata[py], px, gc));
+ else
+ grid_get_cell1(&gd->linedata[py], px, gc);
}
/* Set cell at relative position. */