Skip to content

Commit 98273aa

Browse files
committed
Update stdlib/public/core/StringCreate.swift
Was off by one.
1 parent fa9c80a commit 98273aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/StringCreate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ extension String {
352352
break
353353
case .error:
354354
// validation error: clean up and return nil
355-
buffer.prefix(through: written).deinitialize()
355+
buffer.prefix(upTo: written).deinitialize()
356356
buffer.deallocate()
357357
return nil
358358
case .emptyInput:

0 commit comments

Comments
 (0)