diff --git a/core/src/main/groovy/com/muwire/core/search/ResultsParser.groovy b/core/src/main/groovy/com/muwire/core/search/ResultsParser.groovy index 8be14be0..44796210 100644 --- a/core/src/main/groovy/com/muwire/core/search/ResultsParser.groovy +++ b/core/src/main/groovy/com/muwire/core/search/ResultsParser.groovy @@ -30,7 +30,7 @@ class ResultsParser { private static parseV1(Persona p, UUID uuid, def json) { if (json.name == null) throw new InvalidSearchResultException("name missing") - if (json.size == null || json.size == 0) + if (json.size == null || json.size <= 0) throw new InvalidSearchResultException("length missing") if (json.infohash == null) throw new InvalidSearchResultException("infohash missing") @@ -71,7 +71,7 @@ class ResultsParser { private static UIResultEvent parseV2(Persona p, UUID uuid, def json) { if (json.name == null) throw new InvalidSearchResultException("name missing") - if (json.size == null || json.size == 0) + if (json.size == null || json.size <= 0) throw new InvalidSearchResultException("length missing") if (json.infohash == null) throw new InvalidSearchResultException("infohash missing")