diff --git a/app/src/main/java/com/hippo/ehviewer/ui/compose/data/GalleryInfo.kt b/app/src/main/java/com/hippo/ehviewer/ui/compose/data/GalleryInfo.kt index 6649e3cf0..07e7a26aa 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/compose/data/GalleryInfo.kt +++ b/app/src/main/java/com/hippo/ehviewer/ui/compose/data/GalleryInfo.kt @@ -129,7 +129,8 @@ fun GalleryInfoGridItem( info: GalleryInfo, modifier: Modifier = Modifier, ) { - val aspect = (info.thumbWidth.toFloat() / info.thumbHeight).coerceIn(0.33F, 1.5F) + var aspect = (info.thumbWidth.toFloat() / info.thumbHeight).coerceIn(0.33F, 1.5F) + if (aspect.isNaN()) aspect = 1F val color = EhUtils.getCategoryColor(info.category) val simpleLang = info.simpleLanguage ElevatedCard(