diff --git a/MBBSEmu.Tests/ExportedModules/Majorbbs/sprintf_Tests.cs b/MBBSEmu.Tests/ExportedModules/Majorbbs/sprintf_Tests.cs index 58355d66..0de34d69 100644 --- a/MBBSEmu.Tests/ExportedModules/Majorbbs/sprintf_Tests.cs +++ b/MBBSEmu.Tests/ExportedModules/Majorbbs/sprintf_Tests.cs @@ -40,6 +40,8 @@ public class sprintf_Tests : ExportedModuleTestBase [InlineData("%%%%", "%%", null)] //Escaped % [InlineData("%%%%%", "%%%", null)] //Escaped & Unescaped % [InlineData("%%%%% ", "%%% ", null)] //Escaped & Unescaped % + [InlineData("%-8s", "gold crowns", "gold crowns")] + [InlineData("%-8s", "gold ", "gold")] public void sprintf_Test(string formatString, string expectedString, params object[] values) { Reset(); diff --git a/MBBSEmu/HostProcess/ExportedModules/ExportedModuleBase.cs b/MBBSEmu/HostProcess/ExportedModules/ExportedModuleBase.cs index 54018ea7..07ef10cb 100644 --- a/MBBSEmu/HostProcess/ExportedModules/ExportedModuleBase.cs +++ b/MBBSEmu/HostProcess/ExportedModules/ExportedModuleBase.cs @@ -644,10 +644,6 @@ private protected ReadOnlySpan FormatPrintf(ReadOnlySpan stringToPar msFormattedValue.Write(valueCache); } } - - //Need to truncate -- EZPZ - if (msFormattedValue.Length > stringWidth) - msFormattedValue.SetLength(stringWidth); } msOutput.Write(msFormattedValue.ToArray()); continue;