fixed bug in error handling when parsing torrent files

This commit is contained in:
Arvid Norberg 2009-10-26 20:30:45 +00:00
parent ecb922e013
commit e1080a81c6
2 changed files with 2 additions and 0 deletions

View File

@ -94,6 +94,7 @@ release 0.14.7
* announces torrents immediately to the DHT when it's started
* fixed bug in add_files that would fail to recurse if the path
ended with a /
* fixed bug in error handling when parsing torrent files
release 0.14.6

View File

@ -234,6 +234,7 @@ namespace libtorrent
bool extract_single_file(lazy_entry const& dict, file_entry& target
, std::string const& root_dir)
{
if (dict.type() != lazy_entry::dict_t) return false;
lazy_entry const* length = dict.dict_find("length");
if (length == 0 || length->type() != lazy_entry::int_t)
return false;