From 7bb4955f3fc64627c4c3f93b28173e7fc853e775 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sun, 29 Jul 2018 11:24:43 +0100 Subject: 8 bit glyph plotter: Squash undefined shift error. src/plot/common.c:216:83: runtime error: left shift of 170 by 24 places cannot be represented in type 'int' --- src/plot/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/plot/common.c b/src/plot/common.c index b051131..5f55686 100644 --- a/src/plot/common.c +++ b/src/plot/common.c @@ -213,7 +213,7 @@ glyph8(nsfb_t *nsfb, for (yloop = 0; yloop < height; yloop++) { for (xloop = 0; xloop < width; xloop++) { - abpixel = (pixel[((yoff + yloop) * pitch) + xloop + xoff] << 24) | fgcol; + abpixel = ((unsigned)pixel[((yoff + yloop) * pitch) + xloop + xoff] << 24) | fgcol; if ((abpixel & 0xFF000000) != 0) { /* pixel is not transparent */ if ((abpixel & 0xFF000000) != 0xFF000000) { -- cgit v1.2.3