diff --git a/src/core/wee-string.c b/src/core/wee-string.c index f0566bf2f..f514f55f0 100644 --- a/src/core/wee-string.c +++ b/src/core/wee-string.c @@ -82,7 +82,7 @@ string_strndup (const char *string, int bytes) if (!string || (bytes < 0)) return NULL; - if ((int)strlen (string) < bytes) + if ((int)strlen (string) <= bytes) return strdup (string); result = malloc (bytes + 1);