diff options
author | cjihrig <cjihrig@gmail.com> | 2017-09-25 00:13:32 +0300 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2017-09-27 14:52:43 +0300 |
commit | 75ab1e0d9fee5a99a8ed4ae1d5dd18409df33c4b (patch) | |
tree | a542e091b41357891f8d3307ff26d3b6d484229f /src/node_url.cc | |
parent | 2b9b46cd55835b33382dacb86f614cbcdc5f7b98 (diff) |
src: remove unused computation
PR-URL: https://github.com/nodejs/node/pull/15593
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_url.cc')
-rw-r--r-- | src/node_url.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node_url.cc b/src/node_url.cc index 3b5dbe1653d..04254667d6d 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -515,10 +515,10 @@ static inline void PercentDecode(const char* input, dest->reserve(len); const char* pointer = input; const char* end = input + len; - size_t remaining = pointer - end - 1; + while (pointer < end) { const char ch = pointer[0]; - remaining = (end - pointer) + 1; + size_t remaining = (end - pointer) + 1; if (ch != '%' || remaining < 2 || (ch == '%' && (!IsASCIIHexDigit(pointer[1]) || |