summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2023-02-04 20:17:24 -0800
committerKai Stevenson <kai@kaistevenson.com>2023-02-04 20:17:24 -0800
commit26321477ae47bbf5d89b651842d8295e9ea9ea5d (patch)
treef15751c2d5615f4b0f254e51d07d8ca6947a3a5d
parent90f711be224ad0f205bbab6c945cd8c441de1f00 (diff)
fixed too small allocation in draw_board
-rw-r--r--console.c2
1 files changed, 1 insertions, 1 deletions
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++) {