mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-23 01:58:00 +02:00
Merge pull request #1356 from m910q/FixDebugWriteLineReallocation
Fix for Debug.WriteLine() - Avoid potential String reallocation
This commit is contained in:
commit
94a262d92c
1 changed files with 1 additions and 1 deletions
|
@ -70,7 +70,7 @@ namespace System.Diagnostics
|
||||||
|
|
||||||
public static void WriteLine(StringView line)
|
public static void WriteLine(StringView line)
|
||||||
{
|
{
|
||||||
String lineStr = scope String(Math.Min(line.Length, 4096));
|
String lineStr = scope String(Math.Min(line.Length + 1, 4096));
|
||||||
lineStr.Append(line);
|
lineStr.Append(line);
|
||||||
lineStr.Append('\n');
|
lineStr.Append('\n');
|
||||||
Write(lineStr.Ptr, lineStr.Length);
|
Write(lineStr.Ptr, lineStr.Length);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue