fixed bug in storage

This commit is contained in:
Arvid Norberg 2007-10-03 18:27:07 +00:00
parent f85873263b
commit c9267431b9
1 changed files with 1 additions and 1 deletions

View File

@ -1248,7 +1248,7 @@ namespace libtorrent
, block_size); , block_size);
crc.update(&buf[0], 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( m_storage->read(
&buf[0] &buf[0]