-1 is not used anymore for max_id since it breaks "geting up to post 0"

This commit is contained in:
Miguel Freitas 2013-10-13 18:05:56 -03:00
parent 38424e0afb
commit 19f5c3cc0e
2 changed files with 2 additions and 3 deletions

View File

@ -913,8 +913,7 @@ namespace libtorrent
{
if( !m_picker ) return;
if( max_id < 0 )
max_id = m_picker->last_have();
max_id = std::min( max_id, m_picker->last_have() );
int piece_size = m_torrent_file->piece_size(0);

View File

@ -1125,7 +1125,7 @@ Value getposts(const Array& params, bool fHelp)
for( unsigned int u = 0; u < users.size(); u++ ) {
Object user = users[u].get_obj();
string strUsername;
int max_id = -1;
int max_id = std::numeric_limits<int>::max();
int since_id = -1;
for (Object::const_iterator i = user.begin(); i != user.end(); ++i) {