about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/utils.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/utils.c b/Src/utils.c
index 92d831172..151e9e4eb 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -4252,9 +4252,10 @@ mod_export char **
 arrdup_max(char **s, unsigned max)
 {
     char **x, **y, **send;
-    int len;
+    int len = 0;
 
-    len = arrlen(s);
+    if (max)
+	len = arrlen(s);
 
     /* Limit has sense only if not equal to len */
     if (max > len)