Skip to content

Commit ae657d7

Browse files
committed
missing hunk from 5464492
Signed-off-by: Daniel A. Steffen <[email protected]>
1 parent d051a8b commit ae657d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/swift/Data.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public struct DispatchData : RandomAccessCollection {
130130
///
131131
/// - parameter buffer: The buffer of bytes to append. The size is calculated from `SourceType` and `buffer.count`.
132132
public mutating func append<SourceType>(_ buffer : UnsafeBufferPointer<SourceType>) {
133-
let count = buffer.count * sizeof(SourceType.self)
133+
let count = buffer.count * MemoryLayout<SourceType>.stride;
134134
buffer.baseAddress?.withMemoryRebound(to: UInt8.self, capacity: count) {
135135
self.append($0, count: count)
136136
}

0 commit comments

Comments
 (0)