From 33f8ae59ed5ab1460eefd653959ed7b4187561f3 Mon Sep 17 00:00:00 2001 From: chaoskagami Date: Sun, 12 Jun 2016 20:39:45 -0400 Subject: [PATCH] More funky GCC pointer math crashes (now I know why it's crashing with logs) --- source/std/draw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/std/draw.c b/source/std/draw.c index c8bcd81..2ef41ce 100644 --- a/source/std/draw.c +++ b/source/std/draw.c @@ -50,7 +50,7 @@ clear_disp(uint8_t *screen) FILE *f = fopen(PATH_CFW "/boot.log", "w"); fseek(f, 0, SEEK_END); for (int i = 0; i < TEXT_BOTTOM_HEIGHT - 1; i++) { - char *text = text_buffer_bottom + (TEXT_BOTTOM_WIDTH * i); + char *text = &text_buffer_bottom[TEXT_BOTTOM_WIDTH * i]; for (int j = 0; j < TEXT_BOTTOM_WIDTH; j++) { if (text[j] == 0) text[j] = ' '; -- 2.39.5