merge diff from aio branch to show partially bdecoded files with dump_torrent

This commit is contained in:
Arvid Norberg 2011-06-25 17:42:49 +00:00
parent 69bbee8932
commit 0093229d27
2 changed files with 2 additions and 3 deletions

View File

@ -73,14 +73,14 @@ int main(int argc, char* argv[])
ret = lazy_bdecode(&buf[0], &buf[0] + buf.size(), e, ec, &pos
, depth_limit, item_limit);
printf("\n\n----- raw info -----\n\n%s\n", print_entry(e).c_str());
if (ret != 0)
{
fprintf(stderr, "failed to decode: '%s' at character: %d\n", ec.message().c_str(), pos);
return 1;
}
printf("\n\n----- raw info -----\n\n%s\n", print_entry(e).c_str());
torrent_info t(e, ec);
if (ec)
{

View File

@ -52,7 +52,6 @@ namespace libtorrent
{ \
ec = code; \
if (error_pos) *error_pos = start - orig_start; \
ret.clear(); \
return -1; \
}
// fills in 'val' with what the string between start and the