From 26321477ae47bbf5d89b651842d8295e9ea9ea5d Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Sat, 4 Feb 2023 20:17:24 -0800 Subject: fixed too small allocation in draw_board --- console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'console.c') diff --git a/console.c b/console.c index 19e2a38..e675ba2 100644 --- a/console.c +++ b/console.c @@ -10,7 +10,7 @@ void draw_board(int** board) { int tileColor = 0; for(int r = 0; r < 8; r++) { tileColor = !tileColor; - char* line = calloc(2 + (8 * 16) + 8, sizeof(char)); + char* line = calloc(2 + (8 * 16) + 9, sizeof(char)); line[0] = '8' - r; line[1] = ' '; for(int c = 0; c < 8; c++) { -- cgit v1.3.1