Changeset 10052


Ignore:
Timestamp:
Jan 31, 2010, 6:02:02 PM (12 years ago)
Author:
charles
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gtk/file-list.c

    r9868 r10052  
    112112        const int priority = tr_torrentGetFilePriority( tor, index );
    113113        const uint64_t have = data->refresh_file_stat[index].bytesCompleted;
    114         const int prog = (int)((100.0*have)/size);
     114        const int prog = size ? (int)((100.0*have)/size) : 1;
    115115
    116116        if( (priority!=old_priority) || (enabled!=old_enabled) || (have!=old_have) || (prog!=old_prog) )
     
    160160        while( gtk_tree_model_iter_next( model, &child ) );
    161161
    162         prog = (int)((100.0*have)/sub_size);
     162        prog = sub_size ? (int)((100.0*have)/sub_size) : 1;
    163163
    164164        if( (size!=sub_size) || (have!=old_have)
Note: See TracChangeset for help on using the changeset viewer.