diff options
author | TingPing <tingping@tingping.se> | 2015-03-19 16:47:37 -0400 |
---|---|---|
committer | TingPing <tingping@tingping.se> | 2015-03-19 16:47:37 -0400 |
commit | 1cc06f9301fbd58f69b2a07022544bbf5165d16e (patch) | |
tree | d8c256444908a6efdef02c1a6af9d20ebd4239da | |
parent | 455fa24d63465d1b76249b52addcbc4aea2668ab (diff) |
Fixup dc69f24ae
It still has to be in hex...
-rw-r--r-- | src/common/cfgfiles.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 9911a161..15cb091b 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -231,7 +231,7 @@ cfg_put_color (int fh, guint16 r, guint16 g, guint16 b, char *var) char buf[400]; int len; - g_snprintf (buf, sizeof buf, "%s = %04"G_GUINT16_FORMAT" %04"G_GUINT16_FORMAT" %04"G_GUINT16_FORMAT"\n", var, r, g, b); + g_snprintf (buf, sizeof buf, "%s = %04hx %04hx %04hx\n", var, r, g, b); len = strlen (buf); return (write (fh, buf, len) == len); } @@ -258,7 +258,7 @@ cfg_get_color (char *cfg, char *var, guint16 *r, guint16 *g, guint16 *b) if (!cfg_get_str (cfg, var, str, sizeof (str))) return 0; - sscanf (str, "%04"G_GUINT16_FORMAT" %04"G_GUINT16_FORMAT" %04"G_GUINT16_FORMAT, r, g, b); + sscanf (str, "%04hx %04hx %04hx", r, g, b); return 1; } |