Skip to content

Commit

Permalink
🐛 Fix comparison with ICU
Browse files Browse the repository at this point in the history
Related issue: dotnet/runtime#44687
  • Loading branch information
pleonex committed Dec 14, 2020
1 parent dd514d5 commit f36f11e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Yarhl/IO/DataWriter.cs
Expand Up @@ -321,7 +321,7 @@ public void Write(char[] chars, Encoding encoding = null)
if (encoding == null)
encoding = DefaultEncoding;

if (!string.IsNullOrEmpty(terminator) && !text.EndsWith(terminator, StringComparison.InvariantCulture))
if (!string.IsNullOrEmpty(terminator) && !text.EndsWith(terminator, StringComparison.Ordinal))
text = string.Concat(text, terminator);

int textSize = encoding.GetByteCount(text);
Expand Down Expand Up @@ -401,7 +401,7 @@ public void Write(char[] chars, Encoding encoding = null)
if (encoding == null)
encoding = DefaultEncoding;

if (!string.IsNullOrEmpty(terminator) && !text.EndsWith(terminator, StringComparison.InvariantCulture))
if (!string.IsNullOrEmpty(terminator) && !text.EndsWith(terminator, StringComparison.Ordinal))
text = string.Concat(text, terminator);

int textSize = encoding.GetByteCount(text);
Expand Down

0 comments on commit f36f11e

Please sign in to comment.