Skip to content

Commit

Permalink
url, src: modify one special_back_slash
Browse files Browse the repository at this point in the history
Make it always equals to `false`.

PR-URL: nodejs#42112
Reviewed-By: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
XadillaX authored and sxa committed Mar 7, 2022
1 parent 6183749 commit ecb5980
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/node_url.cc
Original file line number Diff line number Diff line change
Expand Up @@ -932,7 +932,10 @@ void URL::Parse(const char* input,
url->flags &= ~URL_FLAGS_SPECIAL;
special = false;
}
special_back_slash = (special && ch == '\\');
// `special_back_slash` equals to `(special && ch == '\\')` and `ch`
// here always not equals to `\\`. So `special_back_slash` here always
// equals to `false`.
special_back_slash = false;
buffer.clear();
if (has_state_override)
return;
Expand Down

0 comments on commit ecb5980

Please sign in to comment.