diff --git a/toxcore/tox.api.h b/toxcore/tox.api.h index 632d79c5..c77ac685 100644 --- a/toxcore/tox.api.h +++ b/toxcore/tox.api.h @@ -318,12 +318,12 @@ const MAX_FILENAME_LENGTH = 255; /** * Maximum length of a hostname, e.g. proxy or bootstrap node names. * - * This length includes the NUL byte. Hostnames are NUL-terminated C strings, so - * they are 255 characters plus one NUL byte. + * This length does not include the NUL byte. Hostnames are NUL-terminated C + * strings, so they are 255 characters plus one NUL byte. * * @deprecated The macro will be removed in 0.3.0. Use the function instead. */ -const MAX_HOSTNAME_LENGTH = 256; +const MAX_HOSTNAME_LENGTH = 255; /******************************************************************************* diff --git a/toxcore/tox.h b/toxcore/tox.h index 6a4df16d..40d37b0b 100644 --- a/toxcore/tox.h +++ b/toxcore/tox.h @@ -345,12 +345,12 @@ uint32_t tox_max_filename_length(void); /** * Maximum length of a hostname, e.g. proxy or bootstrap node names. * - * This length includes the NUL byte. Hostnames are NUL-terminated C strings, so - * they are 255 characters plus one NUL byte. + * This length does not include the NUL byte. Hostnames are NUL-terminated C + * strings, so they are 255 characters plus one NUL byte. * * @deprecated The macro will be removed in 0.3.0. Use the function instead. */ -#define TOX_MAX_HOSTNAME_LENGTH 256 +#define TOX_MAX_HOSTNAME_LENGTH 255 uint32_t tox_max_hostname_length(void);