From 057cbed20429e5adcb65a40fac82efcaf66be4e2 Mon Sep 17 00:00:00 2001 From: "Vladimir Golovnev (Glassez)" Date: Mon, 1 Feb 2016 09:20:28 +0300 Subject: [PATCH] Fix upgrade corrupted fastresume file --- src/app/upgrade.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/upgrade.h b/src/app/upgrade.h index 82ea229fb..99e31c2c6 100644 --- a/src/app/upgrade.h +++ b/src/app/upgrade.h @@ -88,7 +88,7 @@ bool upgradeResumeFile(const QString &filepath, const QVariantHash &oldTorrent, libtorrent::lazy_entry fastOld; libtorrent::error_code ec; libtorrent::lazy_bdecode(data.constData(), data.constData() + data.size(), fastOld, ec); - if ((fastOld.type() != libtorrent::lazy_entry::dict_t) && !ec) return false; + if (ec || (fastOld.type() != libtorrent::lazy_entry::dict_t)) return false; libtorrent::entry fastNew; fastNew = fastOld;