diff --git a/gtk/tr_core.c b/gtk/tr_core.c index 46fe42726..ce496edd5 100644 --- a/gtk/tr_core.c +++ b/gtk/tr_core.c @@ -174,7 +174,7 @@ static int compareDouble( double a, double b ) { if( a < b ) return -1; - if( b > a ) return 1; + if( b < a ) return 1; return 0; } @@ -244,7 +244,7 @@ compareByProgress( GtkTreeModel * model, sb = tr_torrentStatCached( tb ); ret = compareDouble( sa->percentDone, sb->percentDone ); if( !ret ) - ret = compareDouble( sa->ratio, sa->ratio ); + ret = compareDouble( sa->ratio, sb->ratio ); return ret; }