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 <[email protected]>
  • Loading branch information
XadillaX authored and xtx1130 committed Apr 25, 2022
1 parent 7fc5785 commit a3fb893
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 a3fb893

Please sign in to comment.