From: chaoskagami Date: Mon, 13 Jun 2016 00:39:45 +0000 (-0400) Subject: More funky GCC pointer math crashes (now I know why it's crashing with logs) X-Git-Tag: v0.0.10~16 X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=33f8ae59ed5ab1460eefd653959ed7b4187561f3;p=corbenik%2Fcorbenik.git More funky GCC pointer math crashes (now I know why it's crashing with logs) --- 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] = ' ';