summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/wee-string.c2
1 files changed, 1 insertions, 1 deletions
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);