summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBehdad Esfahbod <behdad@gnome.org>2005-11-10 04:00:30 +0000
committerBehdad Esfahbod <behdad@src.gnome.org>2005-11-10 04:00:30 +0000
commit5b1c61cc424657f0f3af02585348e04866705bc8 (patch)
tree1b5c3866571bcf16e834707ec489f81c0fe98eed
parenta7dc52f68b78024f5e64a7673850eeae5079e6ec (diff)
downloadpango-5b1c61cc424657f0f3af02585348e04866705bc8.tar.gz
Do not call strlen when length < 0. Leave it to language engines to handle
2005-11-09 Behdad Esfahbod <behdad@gnome.org> * pango/break.c (pango_break): Do not call strlen when length < 0. Leave it to language engines to handle NULL-terminated strings.
-rw-r--r--ChangeLog5
-rw-r--r--pango/break.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index df989598..25976a54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2005-11-09 Behdad Esfahbod <behdad@gnome.org>
+ * pango/break.c (pango_break): Do not call strlen when length < 0.
+ Leave it to language engines to handle NULL-terminated strings.
+
+2005-11-09 Behdad Esfahbod <behdad@gnome.org>
+
* pango/mini-fribidi/README, pango/mini-fribidi/fribidi.patch,
pango/mini-fribidi/fribidi.c: Short-circuit on LTR-only or RTL-only
text.
diff --git a/pango/break.c b/pango/break.c
index 8663e4e9..d2973b93 100644
--- a/pango/break.c
+++ b/pango/break.c
@@ -1498,9 +1498,6 @@ pango_break (const gchar *text,
g_return_if_fail (analysis != NULL);
g_return_if_fail (attrs != NULL);
- if (length < 0)
- length = strlen (text);
-
if (analysis->lang_engine &&
PANGO_ENGINE_LANG_GET_CLASS (analysis->lang_engine)->script_break)
PANGO_ENGINE_LANG_GET_CLASS (analysis->lang_engine)->script_break (analysis->lang_engine, text, length, analysis, attrs, attrs_len);