Skip to content
This repository has been archived by the owner on Nov 17, 2020. It is now read-only.

Commit

Permalink
Fix an off-by-one error in g_markup_parse_context_parse(). (#142794,
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
Matthias Clasen authored and Matthias Clasen committed Jun 2, 2004
1 parent 7d662e3 commit d131dec
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog
@@ -1,3 +1,8 @@
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)

Sun May 16 23:20:33 2004 Matthias Clasen <maclas@gmx.de>

* glib/gcompletion.c (g_completion_add_items):
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog.pre-2-10
@@ -1,3 +1,8 @@
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)

Sun May 16 23:20:33 2004 Matthias Clasen <maclas@gmx.de>

* glib/gcompletion.c (g_completion_add_items):
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog.pre-2-12
@@ -1,3 +1,8 @@
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)

Sun May 16 23:20:33 2004 Matthias Clasen <maclas@gmx.de>

* glib/gcompletion.c (g_completion_add_items):
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog.pre-2-6
@@ -1,3 +1,8 @@
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)

Sun May 16 23:20:33 2004 Matthias Clasen <maclas@gmx.de>

* glib/gcompletion.c (g_completion_add_items):
Expand Down
5 changes: 5 additions & 0 deletions ChangeLog.pre-2-8
@@ -1,3 +1,8 @@
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)

Sun May 16 23:20:33 2004 Matthias Clasen <maclas@gmx.de>

* glib/gcompletion.c (g_completion_add_items):
Expand Down
7 changes: 6 additions & 1 deletion glib/gmarkup.c
Expand Up @@ -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
Expand Down

0 comments on commit d131dec

Please sign in to comment.