aboutsummaryrefslogtreecommitdiffstats
path: root/fbmngplay
diff options
context:
space:
mode:
Diffstat (limited to 'fbmngplay')
-rw-r--r--fbmngplay/mng.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fbmngplay/mng.c b/fbmngplay/mng.c
index d899bd0..bee9f46 100644
--- a/fbmngplay/mng.c
+++ b/fbmngplay/mng.c
@@ -226,7 +226,7 @@ static inline void copyline(unsigned char *dest, unsigned char *src,
a = a * mymng->alpha / 100;
switch (mymng->fbbpp) {
case 16:
- input = *((unsigned short *) background)++;
+ input = *background++ << 8 + *background++;
br = (input >> mng->fbredo) << (8-mng->fbredl);
bg = (input >> mng->fbgreeno) << (8-mng->fbgreenl);
@@ -273,7 +273,8 @@ static inline void copyline(unsigned char *dest, unsigned char *src,
output = (r << mng->fbredo) | (g << mng->fbgreeno) | (b << mng->fbblueo);
- *((unsigned short *) dest)++ = output;
+ *dest++ = output;
+ *dest++ = output >> 8;
break;
case 24:
*dest++ = b;