Skip to content

Commit 149a4e5

Browse files
committed
fix
1 parent c84a23c commit 149a4e5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

core/src/com/biglybt/core/metasearch/impl/plugin/PluginResult.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,9 @@
317317
getIntProperty(
318318
int name )
319319
{
320-
return((int)getLongProperty( name ));
320+
long res = getLongProperty( name );
321+
322+
return( res == Long.MIN_VALUE?Integer.MIN_VALUE:(int)res );
321323
}
322324

323325
protected long

core/src/com/biglybt/core/subs/util/SubscriptionResultFilterable.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@
149149
long seeds = (Long)properties.get( SearchResult.PR_SEED_COUNT );
150150
long leechers = (Long)properties.get( SearchResult.PR_LEECHER_COUNT );
151151

152-
completed_count = ((Long)properties.get( SearchResult.PR_COMPLETED_COUNT )).intValue();
152+
long cc = (Long)properties.get( SearchResult.PR_COMPLETED_COUNT );
153+
154+
completed_count = cc<0?-1:(int)cc;
153155

154156
seed_count = (int)(seeds<0?0:seeds);
155157
peer_count = (int)(leechers<0?0:leechers);

0 commit comments

Comments
 (0)