From 8189262182e865e738f137212d4af6c3b96301d8 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 22 Sep 2008 17:37:12 +0000 Subject: [PATCH] cosmetic improvement when printing bdecoded structures --- src/lazy_bdecode.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lazy_bdecode.cpp b/src/lazy_bdecode.cpp index 44506cf5a..6c469b64a 100644 --- a/src/lazy_bdecode.cpp +++ b/src/lazy_bdecode.cpp @@ -395,11 +395,12 @@ namespace libtorrent { os << "["; bool one_liner = (e.list_size() == 0 - || e.list_at(0)->type() == lazy_entry::int_t + || (e.list_at(0)->type() == lazy_entry::int_t + && e.list_size() < 20) || (e.list_at(0)->type() == lazy_entry::string_t && (e.list_at(0)->string_length() < 10 - || e.list_size() < 2))) - && e.list_size() < 5; + || e.list_size() < 2)) + && e.list_size() < 5); if (!one_liner) os << "\n"; for (int i = 0; i < e.list_size(); ++i) {