X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/static/gitweb.js?a=blobdiff_plain;f=src%2Fclient%2Fdraw_wins.c;h=7e8ca5aa307b9aa0fbc642f78c2bfbeb7bfe60a7;hb=28b8b4234e395c3fdc4800e5cfb3dcd70a15cadf;hp=6736a1bbb77b980872fa2950c6b57201f546bb22;hpb=edebb2bf9aa780ee2f7006c1d2be9168564d34df;p=plomrogue diff --git a/src/client/draw_wins.c b/src/client/draw_wins.c index 6736a1b..7e8ca5a 100644 --- a/src/client/draw_wins.c +++ b/src/client/draw_wins.c @@ -1,4 +1,9 @@ -/* src/client/draw_wins.c */ +/* src/client/draw_wins.c + * + * This file is part of PlomRogue. PlomRogue is licensed under the GPL version 3 + * or any later version. For details on its copyright, license, and warranties, + * see the file NOTICE in the root directory of the PlomRogue source package. + */ #define _POSIX_C_SOURCE 200809L /* strdup() */ #include "draw_wins.h" @@ -182,7 +187,7 @@ static void add_line_compact(struct Win * win, char * line, attr_t attri, uint16_t len_line = strlen(line); char * separator = last ? "" : " / "; uint32_t len_line_new = len_line + strlen(separator); - char * line_new = try_malloc(len_line_new, __func__); + char * line_new = try_malloc(len_line_new + 1, __func__); int test = sprintf(line_new, "%s%s", line, separator); exit_trouble(test < 0, __func__, "sprintf"); uint16_t x = 0;