diff options
-rw-r--r-- | core/Messenger.c | 2 | ||||
-rw-r--r-- | core/Messenger.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/core/Messenger.c b/core/Messenger.c index 65a73876..cc22a7f5 100644 --- a/core/Messenger.c +++ b/core/Messenger.c | |||
@@ -72,7 +72,7 @@ int getfriend_id(uint8_t * client_id) | |||
72 | //return -1 if failure. | 72 | //return -1 if failure. |
73 | int getclient_id(int friend_id, uint8_t * client_id) | 73 | int getclient_id(int friend_id, uint8_t * client_id) |
74 | { | 74 | { |
75 | if(friendnumber >= numfriends || friendnumber < 0) | 75 | if(friend_id >= numfriends || friend_id < 0) |
76 | { | 76 | { |
77 | return -1; | 77 | return -1; |
78 | } | 78 | } |
diff --git a/core/Messenger.h b/core/Messenger.h index 679df989..95d1d28e 100644 --- a/core/Messenger.h +++ b/core/Messenger.h | |||
@@ -53,7 +53,7 @@ int getfriend_id(uint8_t * client_id); | |||
53 | //make sure that client_id is of size CLIENT_ID_SIZE. | 53 | //make sure that client_id is of size CLIENT_ID_SIZE. |
54 | //returns 0 if success | 54 | //returns 0 if success |
55 | //return -1 if failure. | 55 | //return -1 if failure. |
56 | int getclient_id(int friend_id, uint8_t * client_id) | 56 | int getclient_id(int friend_id, uint8_t * client_id); |
57 | 57 | ||
58 | //remove a friend | 58 | //remove a friend |
59 | int m_delfriend(int friendnumber); | 59 | int m_delfriend(int friendnumber); |