Skip to content

Commit f332fbc

Browse files
committed
fix compiler warning
1 parent 52623ed commit f332fbc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

noson/src/private/uriencoder.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ std::string pathencode(const std::string& str)
5252
const char* cstr = str.c_str();
5353
while (*cstr)
5454
{
55-
if (*cstr > 0 && uri_pchar_table[*cstr])
55+
if (*cstr > 0 && uri_pchar_table[(unsigned char)*cstr])
5656
out.push_back(*cstr);
5757
else
5858
{
@@ -83,7 +83,7 @@ std::string pathdecode(const std::string& str)
8383
{
8484
char d = static_cast<char>(v);
8585
// do not decode valid pchar
86-
if (d < 0 || uri_pchar_table[d] == 0)
86+
if (d < 0 || uri_pchar_table[(unsigned char)d] == 0)
8787
{
8888
c = d;
8989
cstr += 2;
@@ -116,7 +116,7 @@ std::string urlencode(const std::string& str)
116116
const char* cstr = str.c_str();
117117
while (*cstr)
118118
{
119-
if (*cstr > 0 && uri_uchar_table[*cstr])
119+
if (*cstr > 0 && uri_uchar_table[(unsigned char)*cstr])
120120
out.push_back(*cstr);
121121
else
122122
{

0 commit comments

Comments
 (0)