Kitura / BlueSocket

Socket framework for Swift using the Swift Package Manager. Works on iOS, macOS, and Linux.
Apache License 2.0
1.41k stars 197 forks source link

Fatal error: Negative value is not representable #180

Closed naimyag closed 4 years ago

naimyag commented 4 years ago

SocketUtils.swift 173

let bitOffset = Int(fd) % __fd_set_count let mask = Int32(bitPattern: UInt32(1 << bitOffset))

if fd equals to 31 returns -1 and crash

Device: iPhone 5 IOS version: 10.3.4(14G61)