mirror of
https://github.com/rkd77/elinks.git
synced 2025-06-30 22:19:29 -04:00
Use elinks_ulongcat() instead of snprintf().
This commit is contained in:
parent
864745b55e
commit
3133db3474
@ -13,6 +13,7 @@
|
|||||||
#include "elinks.h"
|
#include "elinks.h"
|
||||||
|
|
||||||
#include "util/color.h"
|
#include "util/color.h"
|
||||||
|
#include "util/conv.h"
|
||||||
#include "util/fastfind.h"
|
#include "util/fastfind.h"
|
||||||
#include "util/string.h"
|
#include "util/string.h"
|
||||||
|
|
||||||
@ -150,5 +151,6 @@ get_color_string(color_T color, unsigned char hexcolor[8])
|
|||||||
void
|
void
|
||||||
color_to_string(color_T color, unsigned char str[8])
|
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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user