From c9267431b9a72356e1def3bbc3562661300f555e Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 3 Oct 2007 18:27:07 +0000 Subject: [PATCH] fixed 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 8c8d62a68..53d8379a0 100755 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -1248,7 +1248,7 @@ namespace libtorrent , block_size); crc.update(&buf[0], block_size); } - if (bi[num_blocks - 1].state == piece_picker::block_info::state_finished) + if (num_blocks > 0 && bi[num_blocks - 1].state == piece_picker::block_info::state_finished) { m_storage->read( &buf[0]