From 25f12a54d2edbe7ac4d5027890a39e808d786c08 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Fri, 17 Mar 2017 12:09:36 +0000 Subject: [PATCH] gutf8: Clarify documentation for g_utf8_get_char_validated() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There is no such thing as ‘no maximum’ when reading a string. It’s got to end somewhere. Signed-off-by: Philip Withnall https://bugzilla.gnome.org/show_bug.cgi?id=780095 --- glib/gutf8.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/glib/gutf8.c b/glib/gutf8.c index 39438cdde..6b74e1f15 100644 --- a/glib/gutf8.c +++ b/glib/gutf8.c @@ -648,9 +648,8 @@ g_utf8_get_char_extended (const gchar *p, /** * g_utf8_get_char_validated: * @p: a pointer to Unicode character encoded as UTF-8 - * @max_len: the maximum number of bytes to read, or -1, for no maximum or - * if @p is nul-terminated - * + * @max_len: the maximum number of bytes to read, or -1 if @p is nul-terminated + * * Convert a sequence of bytes encoded as UTF-8 to a Unicode character. * This function checks for incomplete characters, for invalid characters * such as characters that are out of the range of Unicode, and for