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; 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 if (priv->type() != entry::int_t
// the torrent private || priv->integer() != 0)
m_private = true; {
// this key exists and it's not 0.
// consider the torrent private
m_private = true;
}
} }
#ifndef NDEBUG #ifndef NDEBUG