diff --git a/Types/Posh.Host.UI.Box/get_TopWall.ps1 b/Types/Posh.Host.UI.Box/get_TopWall.ps1 index 6694874..1ce66fe 100644 --- a/Types/Posh.Host.UI.Box/get_TopWall.ps1 +++ b/Types/Posh.Host.UI.Box/get_TopWall.ps1 @@ -3,7 +3,6 @@ Gets a box's top wall character .DESCRIPTION Gets the top wall in a box. - .NOTES If the box only has one line, and it is less than 5 characters, the second character will be considered the top wall. @@ -19,7 +18,7 @@ if ($theLine.Length -lt 5) { # If there is only one line, it is between two and five characters if ($theLine.Length -ge 2) { # pick the second character as the top wall - $theLine.Substring(1,2) + $theLine.Substring(1,1) } else { # (if there was only one character, it's the top wall) $theLine.Substring(0,1) @@ -27,9 +26,4 @@ if ($theLine.Length -lt 5) { } else { # Otherwise, pick one left of the middle in the line $theLine[[Math]::Floor($theLine.Length / 2) - 1] -} - - - - - +} \ No newline at end of file