From af66cb941c2c6e2ae5d3e0507565f43ea9c25f1c Mon Sep 17 00:00:00 2001 From: Sergio Pedri Date: Tue, 17 Oct 2023 11:45:42 +0200 Subject: [PATCH] Fix format provider in IndentedTextWriter --- .../Helpers/IndentedTextWriter.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs b/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs index 37c51870..e9b26bf9 100644 --- a/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs +++ b/src/ComputeSharp.SourceGeneration/Helpers/IndentedTextWriter.cs @@ -4,6 +4,7 @@ using System; using System.ComponentModel; +using System.Globalization; using System.Runtime.CompilerServices; using System.Text; @@ -342,7 +343,7 @@ internal sealed class IndentedTextWriter : IDisposable { if (value is IFormattable) { - this.writer.Write(((IFormattable)value).ToString(format)); + this.writer.Write(((IFormattable)value).ToString(format, CultureInfo.InvariantCulture)); } else if (value is not null) {