diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/curl_fnmatch.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/curl_fnmatch.c b/lib/curl_fnmatch.c index 631268bc1..5a6f137c8 100644 --- a/lib/curl_fnmatch.c +++ b/lib/curl_fnmatch.c @@ -240,10 +240,10 @@ static int setcharset(unsigned char **p, unsigned char *charset) if(!ISPRINT(c)) return SETCHARSET_FAIL; } - if(c == ']') { + else if(c == ']') { return SETCHARSET_OK; } - if(c == '\\') { + else if(c == '\\') { c = *(++(*p)); if(ISPRINT(c)) { charset[c] = 1; @@ -253,7 +253,7 @@ static int setcharset(unsigned char **p, unsigned char *charset) else return SETCHARSET_FAIL; } - if(c >= rangestart) { + else if(c >= rangestart) { if((ISLOWER(c) && ISLOWER(rangestart)) || (ISDIGIT(c) && ISDIGIT(rangestart)) || (ISUPPER(c) && ISUPPER(rangestart))) { @@ -267,6 +267,8 @@ static int setcharset(unsigned char **p, unsigned char *charset) else return SETCHARSET_FAIL; } + else + return SETCHARSET_FAIL; break; case CURLFNM_SCHS_RIGHTBR: if(c == '[') { |