From: Eric S. Raymond Date: Thu, 20 Jul 2017 15:27:02 +0000 (-0400) Subject: Prevent OB1 error. X-Git-Tag: 1.3~33 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=b7af7b9e8703642584f4a4d05fa39afe97e38951;p=open-adventure.git Prevent OB1 error. --- diff --git a/misc.c b/misc.c index 752838b..4b9ac2c 100644 --- a/misc.c +++ b/misc.c @@ -113,7 +113,7 @@ static void vspeak(const char* msg, bool blank, va_list ap) // Unmodified string specifier. if (msg[i] == 's') { char *arg = va_arg(ap, char *); - strncat(renderp, arg, size); + strncat(renderp, arg, size-1); size_t len = strlen(renderp); renderp += len; size -= len;