From 75789e3958fb56ecc6c89bb23e44a99f7e4fa40e Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 4 Sep 2013 04:09:33 +0000 Subject: [PATCH] fix uninitialized variable in disk_io_thread --- src/disk_io_thread.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/disk_io_thread.cpp b/src/disk_io_thread.cpp index 7da6cb785..29fe323b4 100644 --- a/src/disk_io_thread.cpp +++ b/src/disk_io_thread.cpp @@ -1242,7 +1242,11 @@ namespace libtorrent TORRENT_ASSERT(j.cache_min_time >= 0); mutex::scoped_lock l(m_piece_mutex); - if (!m_settings.use_read_cache) return -2; + if (!m_settings.use_read_cache) + { + hit = false; + return -2; + } cache_piece_index_t& idx = m_read_pieces.get<0>(); cache_piece_index_t::iterator p