apps/graphics/pdcurses: Cast to uin16_t before shifting uint8_t value.

This commit is contained in:
Gregory Nutt 2017-11-28 14:44:24 -06:00
parent 9c69257325
commit eabd5eeb9b

View File

@ -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