aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/tool_urlglob.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
index 23fc7f39e..e68e30e84 100644
--- a/src/tool_urlglob.c
+++ b/src/tool_urlglob.c
@@ -201,7 +201,7 @@ static CURLcode glob_range(URLGlob *glob, char **patternp,
unsigned long lstep;
errno = 0;
lstep = strtoul(&pattern[4], &endp, 10);
- if(errno || (*endp != ']'))
+ if(errno || &pattern[4] == endp || *endp != ']')
step = -1;
else {
pattern = endp+1;