]> granicus.if.org Git - nethack/commitdiff
bit
authornhmall <nhmall@nethack.org>
Fri, 26 Feb 2021 14:47:54 +0000 (09:47 -0500)
committernhmall <nhmall@nethack.org>
Fri, 26 Feb 2021 14:47:54 +0000 (09:47 -0500)
src/hacklib.c

index 654e604871c80780522f1c87c05af25794ad8b3e..fe2233dbca9c74b42f72f4be9cd49f8c6e0ea86f 100644 (file)
@@ -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;
         }