Skip to content

Commit 8321a28

Browse files
committed
Minor bug in the SceneKit validation test.
1 parent ece0951 commit 8321a28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

validation-test/stdlib/SceneKit.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ func bytesFromNSData(_ data: NSData) -> [UInt8] {
1919
}
2020

2121
func floatsFromNSData(_ data: NSData) -> [Float] {
22-
let floatPtr = data.bytes.bindMemory(to: Float.self, capacity: data.length)
23-
return Array(UnsafeBufferPointer(start: floatPtr, count: data.length / sizeof(Float)))
22+
let floatPtr = data.bytes.bindMemory(to: Float.self, capacity: data.length / strideof(Float))
23+
return Array(UnsafeBufferPointer(start: floatPtr, count: data.length / strideof(Float)))
2424
}
2525

2626
if #available(iOS 8.0, *) {

0 commit comments

Comments
 (0)