Skip to content

Commit

Permalink
fix(client): syntax bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bububa committed Jul 13, 2021
1 parent afefbfd commit 49dcbea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ func (c *Client) GetChatData(seq uint64, limit uint64, proxy string, passwd stri
// @return msg, 解密的消息明文
func (c *Client) DecryptData(encryptKey string, encryptMsg string) (Message, error) {
encryptKeyC := C.CString(encryptKey)
encryptMsgC := C.CString(encrpytMsg)
encryptMsgC := C.CString(encryptMsg)
msgSlice := C.NewSlice()
defer func() {
C.free(unsafe.Pointer(encryptKeyC))
Expand All @@ -97,7 +97,7 @@ func (c *Client) DecryptData(encryptKey string, encryptMsg string) (Message, err
if ret != 0 {
return nil, NewSDKErr(ret)
}
buf := c.GetContentFromSlice(slice)
buf := c.GetContentFromSlice(msgSlice)
var baseMessage BaseMessage
err := json.Unmarshal(buf, &baseMessage)
if err != nil {
Expand Down

0 comments on commit 49dcbea

Please sign in to comment.