mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
PSStyle: validate background index against BackgroundColorMap (#27106)
This commit is contained in:
@@ -892,7 +892,7 @@ namespace System.Management.Automation
|
||||
throw new ArgumentOutOfRangeException(paramName: nameof(foregroundColor));
|
||||
}
|
||||
|
||||
if (backIndex < 0 || backIndex >= ForegroundColorMap.Length)
|
||||
if (backIndex < 0 || backIndex >= BackgroundColorMap.Length)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(paramName: nameof(backgroundColor));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user