bug fixes

This commit is contained in:
ingvar1995 2016-04-20 12:32:28 +03:00
parent e88090ff17
commit 7b9204a88b
5 changed files with 9 additions and 4 deletions

View file

@ -573,7 +573,7 @@ class Tox(object):
:return: friend number
"""
tox_err_friend_by_public_key = c_int()
result = Tox.libtoxcore.tox_friend_by_public_key(self._tox_pointer, c_char_p(public_key),
result = Tox.libtoxcore.tox_friend_by_public_key(self._tox_pointer, string_to_bin(public_key),
addressof(tox_err_friend_by_public_key))
tox_err_friend_by_public_key = tox_err_friend_by_public_key.value
if tox_err_friend_by_public_key == TOX_ERR_FRIEND_BY_PUBLIC_KEY['OK']: