diff --git a/firmware/bidi.c b/firmware/bidi.c index a6f6b8c5d9..b5851f298e 100644 --- a/firmware/bidi.c +++ b/firmware/bidi.c @@ -131,8 +131,8 @@ void arabjoin(unsigned short * stringprt, int length){ unsigned short *bidi_l2v(const unsigned char *str, int orientation) { int length = utf8length(str); - static unsigned short utf16_buf[MAX_PATH+1]; - static unsigned short bidi_buf[MAX_PATH+1]; + static unsigned short utf16_buf[SCROLL_LINE_SIZE]; + static unsigned short bidi_buf[SCROLL_LINE_SIZE]; unsigned short *heb_str, *target, *tmp; // *broken_str int block_start, block_end, block_type, block_length, i; //long max_chars=0; diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index 1ccbc513d2..3e1ea4430b 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h @@ -367,9 +367,10 @@ extern void lcd_bitmap_transparent(const fb_data *src, int x, int y, /* internal usage, but in multiple drivers */ #ifdef HAVE_LCD_BITMAP #define SCROLL_SPACING 3 +#define SCROLL_LINE_SIZE (MAX_PATH + LCD_WIDTH/2 + SCROLL_SPACING + 2) struct scrollinfo { - char line[MAX_PATH + LCD_WIDTH/2 + SCROLL_SPACING + 2]; + char line[SCROLL_LINE_SIZE]; int len; /* length of line in chars */ int width; /* length of line in pixels */ int offset;