Skip to content

Commit

Permalink
Fixed OpenCL printf newline output. (m4rs-mt#1182)
Browse files Browse the repository at this point in the history
  • Loading branch information
MoFtZ committed Apr 18, 2024
1 parent 7ac8311 commit f489f22
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Src/ILGPU/IR/Values/IOValues.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// ---------------------------------------------------------------------------------------
// ILGPU
// Copyright (c) 2020-2023 ILGPU Project
// Copyright (c) 2020-2024 ILGPU Project
// www.ilgpu.net
//
// File: IOValues.cs
Expand Down Expand Up @@ -311,11 +311,11 @@ public string ToPrintFExpression()
/// </summary>
public string ToEscapedPrintFExpression() =>
ToPrintFExpression()
.Replace("\t", @"\t")
.Replace("\r", @"\r")
.Replace("\n", @"\n")
.Replace("\"", "\\\"")
.Replace("\\", @"\\");
.Replace("\t", @"\t", StringComparison.Ordinal)
.Replace("\r", @"\r", StringComparison.Ordinal)
.Replace("\n", @"\n", StringComparison.Ordinal)
.Replace("\"", "\\\"", StringComparison.Ordinal)
.Replace("\\", @"\\", StringComparison.Ordinal);

#endregion

Expand Down

0 comments on commit f489f22

Please sign in to comment.