From 2967468a8b7437f652ba8d5ff3d408a65bda7e27 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 30 Dec 2011 21:32:27 +0000 Subject: [PATCH] fixed overflow in assert --- src/torrent.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/torrent.cpp b/src/torrent.cpp index 6b3d435de..22bf8c35b 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -2852,7 +2852,7 @@ ctx->set_verify_callback(verify_function, ec); if (!valid_metadata() || m_torrent_file->num_pieces() == 0) return; - TORRENT_ASSERT(st.total_wanted >= m_torrent_file->piece_length() + TORRENT_ASSERT(st.total_wanted >= size_type(m_torrent_file->piece_length()) * (m_torrent_file->num_pieces() - 1)); const int last_piece = m_torrent_file->num_pieces() - 1;