-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Labels
Description
| Previous ID | SR-6361 |
| Radar | None |
| Original Reporter | sashabelonogov (JIRA User) |
| Type | Bug |
| Status | Closed |
| Resolution | Done |
Environment
macOS 10.12.6, Xcode 9.0, Swift 4.0
Additional Detail from JIRA
| Votes | 0 |
| Component/s | Foundation |
| Labels | Bug |
| Assignee | sashabelonogov (JIRA) |
| Priority | Medium |
md5: 30798dd20aad53ebbf352c04dbf2174d
Issue Description:
This example:
var data = Data(bytes: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9])[4..<6]
data.withUnsafeMutableBytes { (ptr: UnsafeMutablePointer<UInt8>) in
ptr.advanced(by: 1).pointee = 0xFF
}crashes with:
fatal error: UnsafeMutableRawBufferPointer with negative count