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