[PATCH 3/9] grapric_utils: set_pixel only write 16bit in 16bit mode
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Tue Dec 23 10:21:52 PST 2014
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
lib/gui/graphic_utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/gui/graphic_utils.c b/lib/gui/graphic_utils.c
index 300c525..6465f8e 100644
--- a/lib/gui/graphic_utils.c
+++ b/lib/gui/graphic_utils.c
@@ -104,7 +104,7 @@ void set_pixel(struct fb_info *info, void *adr, u32 px)
case 8:
break;
case 16:
- *(u16 *)adr = px;
+ *(u16 *)adr = px & 0xffff;
break;
case 32:
*(u32 *)adr = px;
--
2.1.3
More information about the barebox
mailing list