summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPadraig O'Briain <padraigo@src.gnome.org>2001-11-23 17:11:26 +0000
committerPadraig O'Briain <padraigo@src.gnome.org>2001-11-23 17:11:26 +0000
commit2efe6aa596fd509d91fd5e549b8d3cc5632b0570 (patch)
treef35758f10e61dc09c020acc15287a7f22f5af849
parentb4b11e4ba669ddfdb54e7da737f9b9b0f22b9e9f (diff)
downloadpango-2efe6aa596fd509d91fd5e549b8d3cc5632b0570.tar.gz
Fix for bug 65183; i.e. do not call g_utf8_next_char(next) when next is
* pango/break.c (pango_default_break): Fix for bug 65183; i.e. do not call g_utf8_next_char(next) when next is end.
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.pre-1-06
-rw-r--r--ChangeLog.pre-1-106
-rw-r--r--ChangeLog.pre-1-26
-rw-r--r--ChangeLog.pre-1-46
-rw-r--r--ChangeLog.pre-1-66
-rw-r--r--ChangeLog.pre-1-86
-rw-r--r--pango/break.c31
8 files changed, 62 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index b97a3efe..cc0928f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-11-23 Padraig O'Briain <padraig.obriain@sun.com>
+
+ * pango/break.c (pango_default_break):
+ Fix for bug 65183; i.e. do not call g_utf8_next_char(next) when
+ next is end.
+
2001-11-23 Hans Breuer <hans@breuer.org>
* testfonts.c : removed the arbitrary limit to 10 fonts.
diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0
index b97a3efe..cc0928f4 100644
--- a/ChangeLog.pre-1-0
+++ b/ChangeLog.pre-1-0
@@ -1,3 +1,9 @@
+2001-11-23 Padraig O'Briain <padraig.obriain@sun.com>
+
+ * pango/break.c (pango_default_break):
+ Fix for bug 65183; i.e. do not call g_utf8_next_char(next) when
+ next is end.
+
2001-11-23 Hans Breuer <hans@breuer.org>
* testfonts.c : removed the arbitrary limit to 10 fonts.
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index b97a3efe..cc0928f4 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,9 @@
+2001-11-23 Padraig O'Briain <padraig.obriain@sun.com>
+
+ * pango/break.c (pango_default_break):
+ Fix for bug 65183; i.e. do not call g_utf8_next_char(next) when
+ next is end.
+
2001-11-23 Hans Breuer <hans@breuer.org>
* testfonts.c : removed the arbitrary limit to 10 fonts.
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index b97a3efe..cc0928f4 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,9 @@
+2001-11-23 Padraig O'Briain <padraig.obriain@sun.com>
+
+ * pango/break.c (pango_default_break):
+ Fix for bug 65183; i.e. do not call g_utf8_next_char(next) when
+ next is end.
+
2001-11-23 Hans Breuer <hans@breuer.org>
* testfonts.c : removed the arbitrary limit to 10 fonts.
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index b97a3efe..cc0928f4 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,9 @@
+2001-11-23 Padraig O'Briain <padraig.obriain@sun.com>
+
+ * pango/break.c (pango_default_break):
+ Fix for bug 65183; i.e. do not call g_utf8_next_char(next) when
+ next is end.
+
2001-11-23 Hans Breuer <hans@breuer.org>
* testfonts.c : removed the arbitrary limit to 10 fonts.
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index b97a3efe..cc0928f4 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,9 @@
+2001-11-23 Padraig O'Briain <padraig.obriain@sun.com>
+
+ * pango/break.c (pango_default_break):
+ Fix for bug 65183; i.e. do not call g_utf8_next_char(next) when
+ next is end.
+
2001-11-23 Hans Breuer <hans@breuer.org>
* testfonts.c : removed the arbitrary limit to 10 fonts.
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index b97a3efe..cc0928f4 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,9 @@
+2001-11-23 Padraig O'Briain <padraig.obriain@sun.com>
+
+ * pango/break.c (pango_default_break):
+ Fix for bug 65183; i.e. do not call g_utf8_next_char(next) when
+ next is end.
+
2001-11-23 Hans Breuer <hans@breuer.org>
* testfonts.c : removed the arbitrary limit to 10 fonts.
diff --git a/pango/break.c b/pango/break.c
index 1437503d..dd979e5b 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -405,6 +405,7 @@ pango_default_break (const gchar *text,
GUnicodeType prev_type;
GUnicodeBreakType prev_break_type; /* skips spaces */
gboolean prev_was_break_space;
+ gboolean prev_was_end = FALSE;
WordType current_word_type = WordNone;
gunichar last_word_letter = 0;
SentenceState sentence_state = STATE_SENTENCE_OUTSIDE;
@@ -452,23 +453,31 @@ pango_default_break (const gchar *text,
wc = next_wc;
- next = g_utf8_next_char (next);
-
- if (next == end)
+ if (prev_was_end)
{
- /* This is how we fill in the last element (end position) of the
- * attr array - assume there's a newline off the end of @text.
+ /*
+ * If we have already reached the end of @text g_utf8_next_char()
+ * may not increment next
*/
- next_wc = '\n';
- }
- else if (next > end)
- {
next_wc = 0;
}
else
{
- next_wc = g_utf8_get_char (next);
- g_assert (next_wc != 0);
+ next = g_utf8_next_char (next);
+
+ if (next == end)
+ {
+ /* This is how we fill in the last element (end position) of the
+ * attr array - assume there's a newline off the end of @text.
+ */
+ next_wc = '\n';
+ prev_was_end = TRUE;
+ }
+ else
+ {
+ next_wc = g_utf8_get_char (next);
+ g_assert (next_wc != 0);
+ }
}
type = g_unichar_type (wc);