bdecode print formatting fix

This commit is contained in:
Arvid Norberg 2008-05-14 18:58:24 +00:00
parent 8ed949c4d5
commit 7e428db4ca
1 changed files with 3 additions and 2 deletions

View File

@ -370,7 +370,8 @@ namespace libtorrent
bool one_liner = (e.list_size() == 0
|| e.list_at(0)->type() == lazy_entry::int_t
|| (e.list_at(0)->type() == lazy_entry::string_t
&& e.list_at(0)->string_length() < 10))
&& (e.list_at(0)->string_length() < 10
|| e.list_size() < 2)))
&& e.list_size() < 5;
if (!one_liner) os << "\n";
for (int i = 0; i < e.list_size(); ++i)
@ -388,7 +389,7 @@ namespace libtorrent
bool one_liner = (e.dict_size() == 0
|| e.dict_at(0).second->type() == lazy_entry::int_t
|| (e.dict_at(0).second->type() == lazy_entry::string_t
&& e.dict_at(0).second->string_length() < 10)
&& e.dict_at(0).second->string_length() < 30)
|| e.dict_at(0).first.size() < 10)
&& e.dict_size() < 5;