From 4306af94be08c09e6a529a11acb5e71740d0b9aa Mon Sep 17 00:00:00 2001 From: qhy040404 Date: Sat, 18 May 2024 15:17:42 +0800 Subject: [PATCH] fix #1588 --- .../Snap.Hutao/ViewModel/GachaLog/TypedWishSummary.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/GachaLog/TypedWishSummary.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/GachaLog/TypedWishSummary.cs index 0d873668..95f4448e 100644 --- a/src/Snap.Hutao/Snap.Hutao/ViewModel/GachaLog/TypedWishSummary.cs +++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/GachaLog/TypedWishSummary.cs @@ -66,7 +66,7 @@ internal sealed partial class TypedWishSummary : Wish /// public string TotalOrangeFormatted { - get => $"{TotalOrangePull} [{TotalOrangePercent,6:p2}]"; + get => $"{TotalOrangePull} [{(TotalOrangePercent is double.NaN ? 0D : TotalOrangePercent),6:p2}]"; } /// @@ -74,7 +74,7 @@ internal sealed partial class TypedWishSummary : Wish /// public string TotalPurpleFormatted { - get => $"{TotalPurplePull} [{TotalPurplePercent,6:p2}]"; + get => $"{TotalPurplePull} [{(TotalPurplePercent is double.NaN ? 0D : TotalPurplePercent),6:p2}]"; } /// @@ -82,7 +82,7 @@ internal sealed partial class TypedWishSummary : Wish /// public string TotalBlueFormatted { - get => $"{TotalBluePull} [{TotalBluePercent,6:p2}]"; + get => $"{TotalBluePull} [{(TotalBluePercent is double.NaN ? 0D : TotalBluePercent),6:p2}]"; } public ColorSegmentCollection PullPercentSegmentSource