From: nhmall Date: Fri, 26 Feb 2021 14:47:54 +0000 (-0500) Subject: bit X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2cf54f54ad3843eeb129fce3131d254092f620e7;p=nethack bit --- diff --git a/src/hacklib.c b/src/hacklib.c index 654e60487..fe2233dbc 100644 --- a/src/hacklib.c +++ b/src/hacklib.c @@ -1226,7 +1226,7 @@ nonconst(const char *str, char *buf, size_t bufsz) char *retval = emptystr; if (str && buf) - if (strlen(str) < (bufsz - 1)) { + if (strlen(str) <= (bufsz - 1)) { Strcpy(buf, str); retval = buf; }