We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, I'm trying to pass user properties to my publish message, but my application crashes with the error - Index Out of Range.
The error occurs in this method.
func unsignedByteToString(data:[UInt8], offset:Int) -> (resStr: String, newOffset: Int)?{ var newOffset = offset if offset + 1 > data.count { return nil } var length = 0 let comRes = integerCompute(data: data, formatType: formatInt.formatUint16.rawValue, offset: newOffset) length = comRes!.res newOffset = comRes!.newOffset var stringData = Data() for _ in 0 ..< length { stringData.append(**data[newOffset]**) // here newOffset += 1 } guard let res = String(data: stringData, encoding: .utf8) else { return nil } return (res, newOffset) }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hello, I'm trying to pass user properties to my publish message, but my application crashes with the error - Index Out of Range.
The error occurs in this method.
The text was updated successfully, but these errors were encountered: