hash_for_slot fix

This commit is contained in:
Arvid Norberg 2009-06-14 22:50:35 +00:00
parent 3df15ad39e
commit 8f47ba50f1
1 changed files with 1 additions and 1 deletions

View File

@ -537,7 +537,7 @@ namespace libtorrent
if (small_hash && small_piece_size < block_size)
{
ph.h.update((char const*)buf.iov_base, small_piece_size);
if (small_piece_size > 0) ph.h.update((char const*)buf.iov_base, small_piece_size);
*small_hash = hasher(ph.h).final();
small_hash = 0; // avoid this case again
ph.h.update((char const*)buf.iov_base + small_piece_size