forked from pyrite-dev/milsko
use sprintf
git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@556 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
parent
14be6d3bca
commit
ac87fbdd35
1 changed files with 2 additions and 2 deletions
|
|
@ -111,13 +111,13 @@ static void color_picker_click(MwWidget handle, void* user, void* call) {
|
|||
|
||||
hexColor = malloc(8);
|
||||
fgColor = malloc(8);
|
||||
snprintf(hexColor, 8, "#%02X%02X%02X", r, g, b);
|
||||
sprintf(hexColor, "#%02X%02X%02X", r, g, b);
|
||||
|
||||
fr = r > 128 ? 0 : 255;
|
||||
fg = g > 128 ? 0 : 255;
|
||||
fb = b > 128 ? 0 : 255;
|
||||
|
||||
snprintf(fgColor, 8, "#%02X%02X%02X", fr, fg, fb);
|
||||
sprintf(fgColor, "#%02X%02X%02X", fr, fg, fb);
|
||||
MwSetText(picker->inner.color_display, MwNbackground, hexColor);
|
||||
MwSetText(picker->inner.color_display_text, MwNforeground, fgColor);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue