From 3ec6637c2d922c19f111691ce7e3d2ce3223cedb Mon Sep 17 00:00:00 2001 From: fukusuket <41001169+fukusuket@users.noreply.github.com> Date: Thu, 8 May 2025 12:30:17 +0900 Subject: [PATCH] fix: count 0 bug --- WELA.ps1 | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/WELA.ps1 b/WELA.ps1 index c94cb9d1..64017b01 100644 --- a/WELA.ps1 +++ b/WELA.ps1 @@ -74,9 +74,12 @@ if (-not $count) { $count = 0 # 明示的に0を設定しないと空文字列に変換されるため } - $ruleCounts += "info:$([string]$count)" + $ruleCounts += "info: $([string]$count)" } else { - $ruleCounts += "$($level):$($count), " + if (-not $count) { + $count = 0 # 明示的に0を設定しないと空文字列に変換されるため + } + $ruleCounts += "$($level): $($count), " } } $ruleCounts += ")"