Use ordinal comparison when searching for escape sequence

Fixes #3431
This commit is contained in:
Petr Onderka 2016-06-08 10:54:56 +00:00
parent 0b30b148f3
commit 53eb94e89c

View file

@ -66,7 +66,7 @@ namespace Microsoft.DotNet.Cli.Build.Framework
var escapeScan = 0; var escapeScan = 0;
for (;;) for (;;)
{ {
var escapeIndex = message.IndexOf("\x1b[", escapeScan); var escapeIndex = message.IndexOf("\x1b[", escapeScan, StringComparison.Ordinal);
if (escapeIndex == -1) if (escapeIndex == -1)
{ {
var text = message.Substring(escapeScan); var text = message.Substring(escapeScan);