Fix VtSubstring helper method to correctly check chars copied (#19240)

This commit is contained in:
Steve Lee
2023-04-07 11:56:34 -07:00
committed by Dongbo Wang
parent 1448cca637
commit 9b2c125357
@@ -202,7 +202,7 @@ namespace System.Management.Automation.Internal
}
// If the number of copied non-escape-sequence characters has reached the specified length, done copying.
if (offset == length)
if (copyStarted && offset == length)
{
break;
}