Skip to content

Commit f49f6a9

Browse files
committed
Fixes variable name
1 parent 190b8a7 commit f49f6a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/public/core/StringGuts.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ func _persistCString(_ p: UnsafePointer<CChar>?) -> [CChar]? {
325325
guard let s = p else { return nil }
326326
let bytesToCopy = UTF8._nullCodeUnitOffset(in: s) + 1 // +1 for the terminating NUL
327327
let result = [CChar](unsafeUninitializedCapacity: bytesToCopy) { buf, initedCount in
328-
buf.baseAddress!.assign(from: cString, count: bytesToCopy)
328+
buf.baseAddress!.assign(from: s, count: bytesToCopy)
329329
initedCount = bytesToCopy
330330
}
331331
return result

0 commit comments

Comments
 (0)