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; }