fix: Fixes ValueStringBuilder infinite loop (#1311)
This commit is contained in:
parent
e855ca1e61
commit
e8396d25ec
2 changed files with 2 additions and 1 deletions
|
|
@ -187,6 +187,7 @@ public ref struct ValueStringBuilder
|
||||||
while (!((ISpanFormattable)value).TryFormat(destination, out charsWritten, format, default))
|
while (!((ISpanFormattable)value).TryFormat(destination, out charsWritten, format, default))
|
||||||
{
|
{
|
||||||
Grow(1);
|
Grow(1);
|
||||||
|
destination = _chars[_length..];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((uint)charsWritten > (uint)destination.Length)
|
if ((uint)charsWritten > (uint)destination.Length)
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ namespace Server.Commands.Generic
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GenerateArgString(string[] args)
|
public static string GenerateArgString(string[] args)
|
||||||
{
|
{
|
||||||
if (args.Length == 0)
|
if (args.Length == 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue