escape string fix
This commit is contained in:
parent
f15cc7bd29
commit
afaf6df46b
|
@ -205,7 +205,7 @@ namespace libtorrent
|
||||||
std::string ret;
|
std::string ret;
|
||||||
for (int i = 0; i < len; ++i)
|
for (int i = 0; i < len; ++i)
|
||||||
{
|
{
|
||||||
if (std::strchr(unreserved_chars+offset, *str))
|
if (std::strchr(unreserved_chars+offset, *str) && *str != 0)
|
||||||
{
|
{
|
||||||
ret += *str;
|
ret += *str;
|
||||||
}
|
}
|
||||||
|
@ -234,7 +234,7 @@ namespace libtorrent
|
||||||
{
|
{
|
||||||
for (int i = 0; i < len; ++i)
|
for (int i = 0; i < len; ++i)
|
||||||
{
|
{
|
||||||
if (std::strchr(unreserved_chars, *str) == 0)
|
if (std::strchr(unreserved_chars, *str) == 0 || *str == 0)
|
||||||
return true;
|
return true;
|
||||||
++str;
|
++str;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue