piece fix -micah

This commit is contained in:
Marcos Pinto 2007-08-07 06:58:34 +00:00
parent 1897faf395
commit 9dd7f6c6cf
1 changed files with 1 additions and 1 deletions

View File

@ -763,7 +763,7 @@ static PyObject *torrent_has_piece(PyObject *self, PyObject *args)
return NULL; return NULL;
torrent_status s = M_torrents->at(index).handle.status(); torrent_status s = M_torrents->at(index).handle.status();
if ((*s.pieces).size() == 0) if (s.pieces == 0)
return Py_BuildValue("b", false); return Py_BuildValue("b", false);
has_piece = internal_has_piece(*s.pieces, piece_index); has_piece = internal_has_piece(*s.pieces, piece_index);
return Py_BuildValue("b", has_piece); return Py_BuildValue("b", has_piece);