From deb124f5393f8938709ac0bd5ab00082e5cb3723 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Sat, 27 Jul 2013 21:08:06 -0400 Subject: Fixed name related functions. They now should give proper lengths and take length into account when sending. --- core/Messenger.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'core/Messenger.h') diff --git a/core/Messenger.h b/core/Messenger.h index 564e29f2..7263901c 100644 --- a/core/Messenger.h +++ b/core/Messenger.h @@ -85,9 +85,11 @@ int m_friendstatus(int friendnumber); int m_sendmessage(int friendnumber, uint8_t *message, uint32_t length); /* Set our nickname - name must be a string of maximum MAX_NAME_LENGTH length. - return 0 if success - return -1 if failure */ + name must be a string of maximum MAX_NAME_LENGTH length. + length must be at least 1 byte + length is the length of name with the NULL terminator + return 0 if success + return -1 if failure */ int setname(uint8_t *name, uint16_t length); /* get name of friendnumber -- cgit v1.2.3