From b9b555eae26a539ee71b30668f8e3fdb343e6ac1 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Sat, 13 Aug 2016 00:49:19 +0200 Subject: Fixing possible crash when GDISP_NEED_TEXT_WORDWRAP is enabled. --- src/gdisp/gdisp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/gdisp/gdisp.c') diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c index 4f879291..d25a9d55 100644 --- a/src/gdisp/gdisp.c +++ b/src/gdisp/gdisp.c @@ -3170,7 +3170,10 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co /* Callback to render string boxes with word wrap. */ #if GDISP_NEED_TEXT_WORDWRAP static bool mf_countline_callback(mf_str line, uint16_t count, void *state) { - int *linecount = (int*)state; + (void) line; + (void) count; + + uint16_t *linecount = (uint16_t*)state; (*linecount)++; return TRUE; -- cgit v1.2.3