From 3133db347496e98f9968c11637dddcbdca710df6 Mon Sep 17 00:00:00 2001 From: Laurent MONIN Date: Tue, 17 Jan 2006 01:18:45 +0100 Subject: [PATCH] Use elinks_ulongcat() instead of snprintf(). --- src/util/color.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/color.c b/src/util/color.c index 0926fcef..92abadb1 100644 --- a/src/util/color.c +++ b/src/util/color.c @@ -13,6 +13,7 @@ #include "elinks.h" #include "util/color.h" +#include "util/conv.h" #include "util/fastfind.h" #include "util/string.h" @@ -150,5 +151,6 @@ get_color_string(color_T color, unsigned char hexcolor[8]) void color_to_string(color_T color, unsigned char str[8]) { - snprintf(str, 8, "#%06lx", (unsigned long) color); + str[0]='#'; + elinks_ulongcat(&str[1], NULL, (unsigned long) color, 6, '0', 16, 0); }