disp_hmsc29xx.c: Address Coverity flagged negative shift

Coverity CID 1512508

Closes #5084.
This commit is contained in:
Joel Sherrill
2024-08-02 11:28:11 -05:00
committed by Chris Johns
parent 02a8935698
commit 5580f70bbd

View File

@@ -244,7 +244,7 @@ static rtems_status_code disp_hcms29xx_copy_font
byte = src->latin1[glyph_idx]->bitmap[bcnt]; byte = src->latin1[glyph_idx]->bitmap[bcnt];
} }
if (shift_cnt < 0) { if (shift_cnt < 0) {
byte = byte >> shift_cnt; byte = byte << -shift_cnt;
} }
else if (shift_cnt > 0) { else if (shift_cnt > 0) {
byte = byte >> shift_cnt; byte = byte >> shift_cnt;