fixede bug appearing when loading a torrent containing a piece length of 0
This commit is contained in:
parent
fe0d570f05
commit
5e254ffea6
|
@ -1,3 +1,4 @@
|
|||
* fixed bug causing a crash with a torrent with piece length 0
|
||||
* added an extension to the DHT network protocol to support the
|
||||
exchange of nodes with IPv6 addresses.
|
||||
* modified the ip_filter api slightly to support IPv6
|
||||
|
|
|
@ -207,6 +207,7 @@ namespace libtorrent
|
|||
|
||||
// extract piece length
|
||||
m_piece_length = (int)info["piece length"].integer();
|
||||
if (m_piece_length <= 0) throw std::runtime_error("invalid torrent. piece length <= 0");
|
||||
|
||||
// extract file name (or the directory name if it's a multifile libtorrent)
|
||||
if (entry const* e = info.find_key("name.utf-8"))
|
||||
|
|
Loading…
Reference in New Issue