summaryrefslogtreecommitdiffstats
path: root/firmware/export/lcd.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/lcd.h')
-rw-r--r--firmware/export/lcd.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index d56f39d09c..87dda891b9 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -194,7 +194,8 @@ typedef void lcd_fastpixelfunc_type(fb_data *address);
extern fb_data lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];
#elif LCD_DEPTH == 2
#if LCD_PIXELFORMAT == HORIZONTAL_PACKING
-extern fb_data lcd_framebuffer[LCD_HEIGHT][LCD_WIDTH/4];
+#define FB_WIDTH ((LCD_WIDTH+3)/4)
+extern fb_data lcd_framebuffer[LCD_HEIGHT][FB_WIDTH];
#else
extern fb_data lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH];
#endif