Fix an off-by-one error in g_markup_parse_context_parse(). (#142794,

Tue Jun  1 21:56:31 2004  Matthias Clasen  <maclas@gmx.de>

	* glib/gmarkup.c (advance_char): Fix an off-by-one error
	in g_markup_parse_context_parse().  (#142794, Morten Welinder)
This commit is contained in:
Matthias Clasen 2004-06-02 02:02:31 +00:00 committed by Matthias Clasen
parent 1cbaf8d913
commit dfce076fe4
6 changed files with 31 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Tue Jun 1 22:01:40 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmarkup.c (advance_char): Fix an off-by-one error
in g_markup_parse_context_parse(). (#142794, Morten Welinder)
Sun May 16 23:23:29 2004 Matthias Clasen <maclas@gmx.de>
Merged from 2.4:

View File

@ -1,3 +1,8 @@
Tue Jun 1 22:01:40 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmarkup.c (advance_char): Fix an off-by-one error
in g_markup_parse_context_parse(). (#142794, Morten Welinder)
Sun May 16 23:23:29 2004 Matthias Clasen <maclas@gmx.de>
Merged from 2.4:

View File

@ -1,3 +1,8 @@
Tue Jun 1 22:01:40 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmarkup.c (advance_char): Fix an off-by-one error
in g_markup_parse_context_parse(). (#142794, Morten Welinder)
Sun May 16 23:23:29 2004 Matthias Clasen <maclas@gmx.de>
Merged from 2.4:

View File

@ -1,3 +1,8 @@
Tue Jun 1 22:01:40 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmarkup.c (advance_char): Fix an off-by-one error
in g_markup_parse_context_parse(). (#142794, Morten Welinder)
Sun May 16 23:23:29 2004 Matthias Clasen <maclas@gmx.de>
Merged from 2.4:

View File

@ -1,3 +1,8 @@
Tue Jun 1 22:01:40 2004 Matthias Clasen <maclas@gmx.de>
* glib/gmarkup.c (advance_char): Fix an off-by-one error
in g_markup_parse_context_parse(). (#142794, Morten Welinder)
Sun May 16 23:23:29 2004 Matthias Clasen <maclas@gmx.de>
Merged from 2.4:

View File

@ -662,16 +662,21 @@ unescape_text (GMarkupParseContext *context,
static gboolean
advance_char (GMarkupParseContext *context)
{
g_return_val_if_fail (context->iter != context->current_text_end, FALSE);
context->iter = g_utf8_next_char (context->iter);
context->char_number += 1;
if (context->iter == context->current_text_end)
return FALSE;
if (*context->iter == '\n')
{
context->line_number += 1;
context->char_number = 1;
}
return context->iter != context->current_text_end;
return TRUE;
}
static gboolean