Frugghi / SwiftSH

A Swift SSH framework that wraps libssh2.
MIT License
195 stars 75 forks source link

Error with file: Libssh2.swift #19

Open VisualEcho opened 5 years ago

VisualEcho commented 5 years ago

I have updated Xcode to 10.2 yesterday. But when I build my program today, an error at Libssh2.swift: 333

let response = LIBSSH2_USERAUTH_KBDINT_RESPONSE(text: strdup(password), length: UInt32(strlen(password)))

reason is: Value of optional type 'UnsafePointer?' must be unwrapped to a value of type 'UnsafePointer'

I change the code to: let response = LIBSSH2_USERAUTH_KBDINT_RESPONSE(text: strdup(password), length: UInt32(strlen(password!))) and solve this problem, but I don't think that is good way.