From 1ac7e0eaab4b9637ea669dd74eb6c2e7efff46f6 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Tue, 4 Sep 2007 16:40:40 +0000 Subject: [PATCH] prio range fix from andar --- src/deluge_core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/deluge_core.cpp b/src/deluge_core.cpp index 0a3ae47d0..c2c0863ae 100644 --- a/src/deluge_core.cpp +++ b/src/deluge_core.cpp @@ -1827,7 +1827,7 @@ static PyObject *torrent_prioritize_first_last_pieces(PyObject *self, } int start_piece = tor_info.map_file(i, 0, 0).piece; - int end_piece = tor_info.map_file(i, file.size, 0).piece; + int end_piece = tor_info.map_file(i, file.size, 0).piece -1; // Set prio_size to 1% of the file size size_type prio_size = file.size / 100; int prio_pieces = tor_info.map_file(i, prio_size, 0).piece -