fixed private=0 torrent parsing

This commit is contained in:
Arvid Norberg 2006-09-12 00:48:01 +00:00
parent f92b6cd90c
commit 4edfaa0493
1 changed files with 8 additions and 4 deletions

View File

@ -270,11 +270,15 @@ namespace libtorrent
m_extra_info[i->first] = i->second;
}
if (info.find_key("private"))
if (entry const* priv = info.find_key("private"))
{
// this key exists, don't care about its value, consider
// the torrent private
m_private = true;
if (priv->type() != entry::int_t
|| priv->integer() != 0)
{
// this key exists and it's not 0.
// consider the torrent private
m_private = true;
}
}
#ifndef NDEBUG