From 6e1a1b88fa64c75c898c8cfef1cf497e3f838228 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Sun, 15 Jul 2007 09:22:39 +0000 Subject: [PATCH] fix last piece oops --- 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 f80b076d3..db60a477f 100644 --- a/src/deluge_core.cpp +++ b/src/deluge_core.cpp @@ -1436,7 +1436,7 @@ static PyObject *torrent_set_flp(PyObject *self, PyObject *args) torrent_status s = t.handle.status(); const torrent_info &i = t.handle.get_torrent_info(); - int npieces = i.num_pieces(); + int npieces = i.num_pieces() - 1; t.handle.piece_priority(0, num); t.handle.piece_priority(npieces, num);