forked from premiere/premiere-libtorrent
handles lack of 'adler32' key in fast resume data
This commit is contained in:
parent
8cf0510144
commit
a16d592ff4
|
@ -2686,10 +2686,11 @@ namespace detail
|
||||||
, torrent_ptr->block_size()
|
, torrent_ptr->block_size()
|
||||||
, p.info);
|
, p.info);
|
||||||
|
|
||||||
const entry& ad = (*i)["adler32"];
|
const entry* ad = i->find_key("adler32");
|
||||||
|
|
||||||
// crc's didn't match, don't use the resume data
|
// crc's didn't match, don't use the resume data
|
||||||
if (ad.integer() != entry::integer_type(adler))
|
if (ad && ad->type() == entry::int_t
|
||||||
|
&& ad->integer() != entry::integer_type(adler))
|
||||||
{
|
{
|
||||||
error = "checksum mismatch on piece "
|
error = "checksum mismatch on piece "
|
||||||
+ boost::lexical_cast<std::string>(p.index);
|
+ boost::lexical_cast<std::string>(p.index);
|
||||||
|
|
Loading…
Reference in New Issue