Skip to content

Commit

Permalink
trick
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorBo committed May 7, 2023
1 parent 19fde37 commit b79af3f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2116,7 +2116,7 @@ private void Append(ref char value, int valueCount)
if (((uint)chunkLength + (uint)valueCount) <= (uint)chunkChars.Length)
{
ref char destination = ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(chunkChars), chunkLength);
if (valueCount <= 2)
if (valueCount <= 2 && !RuntimeHelpers.IsKnownConstant(valueCount))
{
destination = value;
if (valueCount == 2)
Expand Down

0 comments on commit b79af3f

Please sign in to comment.