1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-20 21:26:53 +00:00

(trunk gtk) #2845 ""-2147483648" of type `gint' is invalid or out of range" -- fixed in trunk for 1.90

This commit is contained in:
Charles Kerr 2010-01-31 18:02:02 +00:00
parent 02ffbe75e4
commit 40627dc831

View file

@ -111,7 +111,7 @@ refreshFilesForeach( GtkTreeModel * model,
const int enabled = tr_torrentGetFileDL( tor, index );
const int priority = tr_torrentGetFilePriority( tor, index );
const uint64_t have = data->refresh_file_stat[index].bytesCompleted;
const int prog = (int)((100.0*have)/size);
const int prog = size ? (int)((100.0*have)/size) : 1;
if( (priority!=old_priority) || (enabled!=old_enabled) || (have!=old_have) || (prog!=old_prog) )
gtk_tree_store_set( data->store, iter, FC_PRIORITY, priority,
@ -159,7 +159,7 @@ refreshFilesForeach( GtkTreeModel * model,
}
while( gtk_tree_model_iter_next( model, &child ) );
prog = (int)((100.0*have)/sub_size);
prog = sub_size ? (int)((100.0*have)/sub_size) : 1;
if( (size!=sub_size) || (have!=old_have)
|| (priority!=old_priority)