From 95dd3dfdde08dcc6dd1c6caca067e69242a21f03 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Tue, 11 Feb 2014 19:20:43 -0500 Subject: Added paragraph explaining how strings work in Tox. --- toxcore/tox.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/toxcore/tox.h b/toxcore/tox.h index 0597c435..75e1a303 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h @@ -128,6 +128,14 @@ TOX_USERSTATUS; typedef struct Tox Tox; #endif +/* NOTE: Strings in Tox are all UTF-8, also the last byte in all strings must be NULL (0). + * + * The length when passing those strings to the core includes that NULL character. + * + * It wont do anything if you send you send non NULL terminated strings because Tox force NULL terminates them anyways + * when it receives them. + */ + /* return TOX_FRIEND_ADDRESS_SIZE byte address to give to others. * format: [client_id (32 bytes)][nospam number (4 bytes)][checksum (2 bytes)] */ -- cgit v1.2.3