From eabd5eeb9b7c2f44fc8818c3946da81627b65ae7 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 28 Nov 2017 14:44:24 -0600 Subject: [PATCH] apps/graphics/pdcurses: Cast to uin16_t before shifting uint8_t value. --- graphics/pdcurs34/nuttx/pdcdisp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphics/pdcurs34/nuttx/pdcdisp.c b/graphics/pdcurs34/nuttx/pdcdisp.c index 567a179b2..a5109589c 100644 --- a/graphics/pdcurs34/nuttx/pdcdisp.c +++ b/graphics/pdcurs34/nuttx/pdcdisp.c @@ -515,7 +515,7 @@ static inline void PDC_copy_glyph(FAR struct pdc_fbstate_s *fbstate, for (n = lshift; n < npixels; n += 8) { *dptr++ = (shifted >> 8); - shifted = (shifted << 8) | sptr[1] << lshift; + shifted = (shifted << 8) | (uint16_t)sptr[1] << lshift; sptr++; } #else