From 5c9a7b891fc823fa1b5df09ec53b31db11e96145 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 13 Sep 2018 08:29:55 +0200 Subject: LOLWUT: change padding conditional to a more direct one. --- src/lolwut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lolwut.c') diff --git a/src/lolwut.c b/src/lolwut.c index f49009c17..33824729b 100644 --- a/src/lolwut.c +++ b/src/lolwut.c @@ -177,7 +177,7 @@ void lwDrawSquare(lwCanvas *canvas, int x, int y, float size, float angle) { lwCanvas *lwDrawSchotter(int console_cols, int squares_per_row, int squares_per_col) { /* Calculate the canvas size. */ int canvas_width = console_cols*2; - int padding = console_cols > 2 ? 2 : 0; + int padding = canvas_width > 4 ? 2 : 0; float square_side = (float)(canvas_width-padding*2) / squares_per_row; int canvas_height = square_side * squares_per_col + padding*2; lwCanvas *canvas = lwCreateCanvas(canvas_width, canvas_height); -- cgit v1.2.1