mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-01 16:30:15 +00:00
label: Pass <markup> length directly when parsing markup
This commit is contained in:
parent
b16157bc0d
commit
74b5eaa700
@ -2223,7 +2223,7 @@ parse_uri_markup (GtkLabel *label,
|
||||
guint *out_n_links,
|
||||
GError **error)
|
||||
{
|
||||
GMarkupParseContext *context = NULL;
|
||||
GMarkupParseContext *context;
|
||||
const char *p, *end;
|
||||
gsize length;
|
||||
UriParserData pdata;
|
||||
@ -2249,13 +2249,13 @@ parse_uri_markup (GtkLabel *label,
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!g_markup_parse_context_parse (context, "<markup>", -1, error))
|
||||
if (!g_markup_parse_context_parse (context, "<markup>", 8, error))
|
||||
goto failed;
|
||||
|
||||
if (!g_markup_parse_context_parse (context, str, length, error))
|
||||
goto failed;
|
||||
|
||||
if (!g_markup_parse_context_parse (context, "</markup>", -1, error))
|
||||
if (!g_markup_parse_context_parse (context, "</markup>", 9, error))
|
||||
goto failed;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user