Skip to content

Commit

Permalink
Fixed SignalSenderKeyName's constructor groupPointer initialization
Browse files Browse the repository at this point in the history
Same problem seen here christophhagen#2 was existing for `SignalSenderKeyName`
  • Loading branch information
thibauddavid authored Mar 3, 2021
1 parent 214553b commit 0d8135c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libsignal-protocol-swift/Misc/SignalSenderKeyName.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public final class SignalSenderKeyName {
self.groupId = groupId
self.sender = sender
let count = groupId.utf8.count
self.groupPointer = UnsafeMutablePointer<Int8>.allocate(capacity: count)
self.groupPointer = UnsafeMutablePointer<Int8>(mutating: (groupId as NSString).utf8String!)
groupPointer.assign(from: groupId, count: count)
self.address = UnsafeMutablePointer<signal_protocol_sender_key_name>.allocate(capacity: 1)

Expand Down

0 comments on commit 0d8135c

Please sign in to comment.