From a20b0761fd785a0b2d6f9c3cd69da7e638c2d70f Mon Sep 17 00:00:00 2001 From: Michal Buzik Date: Wed, 26 Mar 2025 10:22:50 +0100 Subject: [PATCH] Fix nested string formatting in DoubleBox's return statement Revised the return statement to correctly handle nested string formatting by ensuring the format string is constructed properly. This resolves potential formatting issues with dynamic values. --- TBF/Boxes/DoubleBox.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TBF/Boxes/DoubleBox.cs b/TBF/Boxes/DoubleBox.cs index f90508298..6cc20a0e7 100644 --- a/TBF/Boxes/DoubleBox.cs +++ b/TBF/Boxes/DoubleBox.cs @@ -76,7 +76,7 @@ namespace TBF.Boxes } else { - return string.Format( $"{{0:{Format}}}", Val * Factor); + return string.Format(string.Format("{{0:{0}}}", Format), Val * Factor); } }