summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2018-12-06 01:23:33 -0600
committerWilliam Wilgus <me.theuser@yahoo.com>2019-07-10 06:31:22 +0200
commit3ec002e12160957265e5980cbd54a028ba19319b (patch)
treea439d9f3e44101b3c33f5b90d52ea709500446f8
parenta980c0b3e51466d041f1a05a1bd2e7afd6a8efe8 (diff)
downloadrockbox-3ec002e.tar.gz
rockbox-3ec002e.zip
Fix truncation warning color_picker.c->draw_screen
Change-Id: I72f16163684aba6c9c3fcf4ade6f2906d80b3899
-rw-r--r--apps/gui/color_picker.c4
1 files changed, 2 insertions, 2 deletions
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);