diff options
Diffstat (limited to 'src/nsimage.m')
-rw-r--r-- | src/nsimage.m | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nsimage.m b/src/nsimage.m index fa1e98b8848..3cccc984ca9 100644 --- a/src/nsimage.m +++ b/src/nsimage.m @@ -407,9 +407,10 @@ ns_set_alpha (void *img, int x, int y, unsigned char a) if (pixmapData[0] != NULL) { int loc = x + y * [self size].width; - return (pixmapData[3][loc] << 24) /* alpha */ - | (pixmapData[0][loc] << 16) | (pixmapData[1][loc] << 8) - | (pixmapData[2][loc]); + return (((unsigned long) pixmapData[3][loc] << 24) /* alpha */ + | ((unsigned long) pixmapData[0][loc] << 16) + | ((unsigned long) pixmapData[1][loc] << 8) + | (unsigned long) pixmapData[2][loc]); } else { |