We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
memset
1 parent c0e8ef3 commit 6469433Copy full SHA for 6469433
Sources/System/Internals/Exports.swift
@@ -87,7 +87,8 @@ internal func system_memset(
87
_ buffer: UnsafeMutableRawBufferPointer,
88
to byte: UInt8
89
) {
90
- memset(buffer.baseAddress, CInt(byte), buffer.count)
+ guard buffer.count > 0 else { return }
91
+ memset(buffer.baseAddress!, CInt(byte), buffer.count)
92
}
93
94
// Interop between String and platfrom string
0 commit comments