]> Chaos Git - corbenik/corbenik.git/commitdiff
More funky GCC pointer math crashes (now I know why it's crashing with logs)
authorchaoskagami <chaos.kagami@gmail.com>
Mon, 13 Jun 2016 00:39:45 +0000 (20:39 -0400)
committerchaoskagami <chaos.kagami@gmail.com>
Mon, 13 Jun 2016 00:39:45 +0000 (20:39 -0400)
source/std/draw.c

index c8bcd8151021d3515b329e97b9948d7b4214a705..2ef41ceb2fd9a560de91f4ff79f9897a94dd1cf0 100644 (file)
@@ -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] = ' ';