mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-24 22:46:15 +01:00
gdate: Use string length when validating UTF-8
Makes the validation a tiny bit faster. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
3fc314ec38
commit
59999737c9
@ -1243,7 +1243,7 @@ g_date_set_parse (GDate *d,
|
||||
return;
|
||||
|
||||
/* The input has to be valid UTF-8. */
|
||||
if (!g_utf8_validate (str, -1, NULL))
|
||||
if (!g_utf8_validate_len (str, str_len, NULL))
|
||||
return;
|
||||
|
||||
G_LOCK (g_date_global);
|
||||
|
Loading…
Reference in New Issue
Block a user