windows fix for lazy bdecode
This commit is contained in:
parent
a70789872e
commit
dbfd400536
|
@ -44,7 +44,8 @@ namespace libtorrent
|
||||||
{
|
{
|
||||||
while (start < end && *start != delimiter)
|
while (start < end && *start != delimiter)
|
||||||
{
|
{
|
||||||
if (!std::isdigit(*start)) { fail_bdecode(); return 0; }
|
using namespace std;
|
||||||
|
if (!isdigit(*start)) { fail_bdecode(); return 0; }
|
||||||
val *= 10;
|
val *= 10;
|
||||||
val += *start - '0';
|
val += *start - '0';
|
||||||
++start;
|
++start;
|
||||||
|
@ -132,7 +133,8 @@ namespace libtorrent
|
||||||
continue;
|
continue;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
if (!std::isdigit(t)) return fail_bdecode();
|
using namespace std;
|
||||||
|
if (!isdigit(t)) return fail_bdecode();
|
||||||
|
|
||||||
boost::int64_t len = t - '0';
|
boost::int64_t len = t - '0';
|
||||||
start = parse_int(start, end, ':', len);
|
start = parse_int(start, end, ':', len);
|
||||||
|
|
Loading…
Reference in New Issue