mirror of
https://github.com/curl/curl.git
synced 2025-03-07 15:27:17 +08:00
urlapi: fix part of conditional expression is always true: qlen
Closes #10408
This commit is contained in:
parent
690c43b3ee
commit
2b46ce0313
@ -1157,7 +1157,7 @@ static CURLUcode parseurl(const char *url, CURLU *u, unsigned int flags)
|
|||||||
size_t qlen = strlen(query) - fraglen; /* includes '?' */
|
size_t qlen = strlen(query) - fraglen; /* includes '?' */
|
||||||
pathlen = strlen(path) - qlen - fraglen;
|
pathlen = strlen(path) - qlen - fraglen;
|
||||||
if(qlen > 1) {
|
if(qlen > 1) {
|
||||||
if(qlen && (flags & CURLU_URLENCODE)) {
|
if(flags & CURLU_URLENCODE) {
|
||||||
struct dynbuf enc;
|
struct dynbuf enc;
|
||||||
Curl_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
|
Curl_dyn_init(&enc, CURL_MAX_INPUT_LENGTH);
|
||||||
/* skip the leading question mark */
|
/* skip the leading question mark */
|
||||||
|
Loading…
Reference in New Issue
Block a user