From: Daniel Carl Date: Sat, 29 Dec 2012 20:25:52 +0000 (+0100) Subject: Fixed array-bounds warning. X-Git-Url: https://git.owens.tech/git.owens.tech/git.owens.tech/git?a=commitdiff_plain;h=f11dcb92b5987286488299e9d045a909e7ce679b;p=vimb.git Fixed array-bounds warning. --- diff --git a/src/setting.c b/src/setting.c index 40b8ca5..050e9e1 100644 --- a/src/setting.c +++ b/src/setting.c @@ -289,7 +289,7 @@ static gboolean setting_hint_style(const Setting* s) style->hint_bg[HEX_COLOR_LEN - 1] = '\0'; } else if (!g_strcmp0(s->name, "hint-bg-focus")) { strncpy(style->hint_bg_focus, s->arg.s, HEX_COLOR_LEN - 1); - style->hint_bg_focus[HEX_COLOR_LEN] = '\0'; + style->hint_bg_focus[HEX_COLOR_LEN - 1] = '\0'; } else if (!g_strcmp0(s->name, "hint-fg")) { strncpy(style->hint_fg, s->arg.s, HEX_COLOR_LEN - 1); style->hint_fg[HEX_COLOR_LEN - 1] = '\0';