From 53eb94e89caf624c3cad42890d5472162fc797d6 Mon Sep 17 00:00:00 2001 From: Petr Onderka Date: Wed, 8 Jun 2016 10:54:56 +0000 Subject: [PATCH] Use ordinal comparison when searching for escape sequence Fixes #3431 --- .../Microsoft.DotNet.Cli.Build.Framework/AnsiConsole.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_projects/Microsoft.DotNet.Cli.Build.Framework/AnsiConsole.cs b/build_projects/Microsoft.DotNet.Cli.Build.Framework/AnsiConsole.cs index 5cdcc75a2..a7ccb8227 100644 --- a/build_projects/Microsoft.DotNet.Cli.Build.Framework/AnsiConsole.cs +++ b/build_projects/Microsoft.DotNet.Cli.Build.Framework/AnsiConsole.cs @@ -66,7 +66,7 @@ namespace Microsoft.DotNet.Cli.Build.Framework var escapeScan = 0; for (;;) { - var escapeIndex = message.IndexOf("\x1b[", escapeScan); + var escapeIndex = message.IndexOf("\x1b[", escapeScan, StringComparison.Ordinal); if (escapeIndex == -1) { var text = message.Substring(escapeScan);