diff options
Diffstat (limited to 'src/gui/curses/gui-curses-color.c')
-rw-r--r-- | src/gui/curses/gui-curses-color.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/curses/gui-curses-color.c b/src/gui/curses/gui-curses-color.c index cacb8ec46..dcd7428bb 100644 --- a/src/gui/curses/gui-curses-color.c +++ b/src/gui/curses/gui-curses-color.c @@ -228,7 +228,7 @@ gui_color_assign (t_gui_color **color, char *fg_and_bg) if (*color->string) free (*color->string); - *color->string = (char *)malloc (4); + *color->string = (char *)malloc (4 * sizeof (char)); if (*color->string) snprintf (*color->string, 4, "%s%02d", @@ -278,7 +278,7 @@ gui_color_build (int number, int foreground, int background) new_color->foreground = gui_weechat_colors[foreground].foreground; new_color->background = gui_weechat_colors[background].foreground; new_color->attributes = gui_weechat_colors[foreground].attributes; - new_color->string = (char *)malloc (4); + new_color->string = (char *)malloc (4 * sizeof (char)); if (new_color->string) snprintf (new_color->string, 4, "%s%02d", |