Skip to content

Commit fcf205d

Browse files
committed
fix: makes uri decode platform independent
1 parent 5b094c0 commit fcf205d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/decode.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ std::string uri_decode(const std::string & sSrc) {
9999
while (pSrc < SRC_LAST_DEC) {
100100
if (*pSrc == '%') {
101101
char dec1, dec2;
102-
if (-1 != (dec1 = string::HEX2DEC[*(pSrc + 1)])
103-
&& -1 != (dec2 = string::HEX2DEC[*(pSrc + 2)])) {
102+
if ((char)-1 != (dec1 = string::HEX2DEC[*(pSrc + 1)])
103+
&& (char)-1 != (dec2 = string::HEX2DEC[*(pSrc + 2)])) {
104104
*pEnd++ = (dec1 << 4) + dec2;
105105
pSrc += 3;
106106
continue;

0 commit comments

Comments
 (0)