From: cyreve Date: Mon, 18 Dec 2006 21:56:47 +0000 (+0000) Subject: bug 1614678: infinite loop on text containing a character pango describes as 'mandato... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=398f48aa9031953286ae2f9fdc1b14e39a3b8f7c;p=inkscape.git bug 1614678: infinite loop on text containing a character pango describes as 'mandatory break' --- diff --git a/src/libnrtype/Layout-TNG-Compute.cpp b/src/libnrtype/Layout-TNG-Compute.cpp index fc69ef4c7..dfbc282c8 100755 --- a/src/libnrtype/Layout-TNG-Compute.cpp +++ b/src/libnrtype/Layout-TNG-Compute.cpp @@ -19,9 +19,9 @@ namespace Inkscape { namespace Text { //#define IFTRACE(_code) _code -//#define TRACE(_args) g_print _args #define IFTRACE(_code) -#define TRACE(_args) + +#define TRACE(_args) IFTRACE(g_print _args) // ******* enum conversion tables static Layout::EnumConversionItem const enum_convert_spstyle_direction_to_pango_direction[] = { @@ -291,7 +291,7 @@ class Layout::Calculator do { PangoLogAttr const &char_attributes = _charAttributes(para, span->end); - if (char_attributes.is_mandatory_break) { + if (char_attributes.is_mandatory_break && span->end != span->start) { *last_emergency_break_span = *last_break_span = *span; TRACE(("span %d end of para; width = %f chars = %d\n", span->start.iter_span - para.unbroken_spans.begin(), span->width, char_count)); return false;