From 8bedab1672ae406532091af8c063408ee3280331 Mon Sep 17 00:00:00 2001 From: Paulo Faria Date: Mon, 26 Oct 2015 03:05:13 -0200 Subject: [PATCH] fix CURVE getters --- SwiftZMQ/Socket.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SwiftZMQ/Socket.swift b/SwiftZMQ/Socket.swift index ab99837..5b1dcdf 100644 --- a/SwiftZMQ/Socket.swift +++ b/SwiftZMQ/Socket.swift @@ -520,14 +520,14 @@ extension Socket { } public func getCURVESecretKey() throws -> String { - var value = [Int8](count: 42, repeatedValue: 0) + var value = [Int8](count: 41, repeatedValue: 0) var length = value.count try getOption(ZMQ_CURVE_SECRETKEY, value: &value, length: &length) return String.fromCString(Array(value[0 ..< length]))! } public func getCURVEServerKey() throws -> String { - var value = [Int8](count: 42, repeatedValue: 0) + var value = [Int8](count: 41, repeatedValue: 0) var length = value.count try getOption(ZMQ_CURVE_SERVERKEY, value: &value, length: &length) return String.fromCString(Array(value[0 ..< length]))!