Fix error on appending arg set when current length equals to capacity in string formatter.
This commit is contained in:
@@ -400,7 +400,7 @@ namespace System.Text.Formatting {
|
|||||||
var segmentsLeft = false;
|
var segmentsLeft = false;
|
||||||
var prevArgIndex = 0;
|
var prevArgIndex = 0;
|
||||||
do {
|
do {
|
||||||
CheckCapacity((int)(end - curr));
|
CheckCapacity((int)(end - curr) + 1);
|
||||||
fixed (char* bufferPtr = &buffer[currentCount])
|
fixed (char* bufferPtr = &buffer[currentCount])
|
||||||
segmentsLeft = AppendSegment(ref curr, end, bufferPtr, ref prevArgIndex, ref args);
|
segmentsLeft = AppendSegment(ref curr, end, bufferPtr, ref prevArgIndex, ref args);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user