From 3ec002e12160957265e5980cbd54a028ba19319b Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Thu, 6 Dec 2018 01:23:33 -0600 Subject: Fix truncation warning color_picker.c->draw_screen Change-Id: I72f16163684aba6c9c3fcf4ade6f2906d80b3899 --- apps/gui/color_picker.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/gui') diff --git a/apps/gui/color_picker.c b/apps/gui/color_picker.c index a66b131560..03096e5589 100644 --- a/apps/gui/color_picker.c +++ b/apps/gui/color_picker.c @@ -259,9 +259,9 @@ static void draw_screen(struct screen *display, char *title, display->putsxy(text_x, text_top, buf); /* Draw color value */ if (display->depth >= 24) - snprintf(buf, 4, "%03d", rgb->rgb_val[i]); + snprintf(buf, 4, "%03d", rgb->rgb_val[i] & 0xFF); else - snprintf(buf, 3, "%02d", rgb->rgb_val[i]); + snprintf(buf, 3, "%02d", rgb->rgb_val[i] & 0x3F); vp.flags |= VP_FLAG_ALIGN_RIGHT; display->putsxy(text_x, text_top, buf); -- cgit v1.2.3