From 682a5f85f9c206ba524b62c41886459d291d1a5d Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 22 Feb 2008 06:09:30 +0000 Subject: [PATCH] fixed crash bug in storage --- src/storage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage.cpp b/src/storage.cpp index e874fcaf2..1eced4f7f 100755 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -1256,7 +1256,7 @@ namespace libtorrent m_slot_to_piece.begin(); i != last.base(); ++i) { - p.push_back(have[*i] ? *i : unassigned); + p.push_back((*i >= 0 && have[*i]) ? *i : unassigned); } } else