From d45e6cb11887aa96651f0839a32dd619425d0b10 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sun, 31 May 2009 10:15:45 +0000 Subject: [PATCH] fix bug in disk_io_thread --- src/disk_io_thread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/disk_io_thread.cpp b/src/disk_io_thread.cpp index a8acbd96e..0a834bcf6 100644 --- a/src/disk_io_thread.cpp +++ b/src/disk_io_thread.cpp @@ -1104,9 +1104,9 @@ namespace libtorrent , p, dont_flush_write_blocks) == 0) return -2; - int ret = read_into_piece(*p, block, 0, blocks_to_read, l); + size = read_into_piece(*p, block, 0, blocks_to_read, l); hit = false; - if (ret < 0) return ret; + if (size < 0) return size; TORRENT_ASSERT(p->blocks[block]); }