Use -1.0f instead of NaN to represent no rating

This commit is contained in:
seven332 committed 2016-04-01 18:18:31 +08:00
1 parent b874a259fe
commit 015bcce8a3
4 files changed
+11 -6

No files matched your search

@@ -162,7 +162,12 @@ public class EhDB {
gi.category = cursor.getInt(4);
gi.thumb = cursor.getString(5);
gi.uploader = cursor.getString(6);
gi.rating = cursor.getFloat(7);
try {
// In 0.6.x version, NaN is stored
gi.rating = cursor.getFloat(7);
} catch (Exception e) {
gi.rating = -1.0f;
}
map.put(gi.gid, gi);