openbsd-ports/x11/fbpanel/patches/patch-panel_misc_c
dcoppa 52de70b04b Update to fbpanel-6.1. The new battery plugin is disabled as it's
not fully functional yet (even on linux).

Fix WANTLIB while here.
2010-12-21 10:29:48 +00:00

16 lines
479 B
Plaintext

$OpenBSD: patch-panel_misc_c,v 1.2 2010/12/21 10:29:48 dcoppa Exp $
use g_snprintf instead of g_sprintf
--- panel/misc.c.orig Wed Apr 28 13:39:31 2010
+++ panel/misc.c Tue Dec 21 06:56:28 2010
@@ -687,7 +687,7 @@ gchar *
gdk_color_to_RRGGBB(GdkColor *color)
{
static gchar str[10]; // #RRGGBB + \0
- g_sprintf(str, "#%02x%02x%02x",
+ g_snprintf(str, sizeof(str), "#%02x%02x%02x",
color->red >> 8, color->green >> 8, color->blue >> 8);
return str;
}