From ccbcc88b3f16519a9d24aa8429dc6c96e8635e8e Mon Sep 17 00:00:00 2001 From: fukusuket <41001169+fukusuket@users.noreply.github.com> Date: Sun, 5 Oct 2025 13:43:08 +0900 Subject: [PATCH] fix: correct rule count initialization --- WELA.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/WELA.ps1 b/WELA.ps1 index dca7f1fd..40231462 100644 --- a/WELA.ps1 +++ b/WELA.ps1 @@ -5046,10 +5046,10 @@ function AuditLogSetting { $ruleCounts = "" foreach ($level in [WELA]::Levels) { $count = $_.RulesCount[$level] + if (-not $count) { + $count = 0 + } if ($level -eq "informational") { - if (-not $count) { - $count = 0 - } $ruleCounts += "info:$([string]$count)" } else { $ruleCounts += "$($level):$($count), "