From c3eb827e44633ae7633f519cd803cb79e71f2aee Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 18 Aug 2015 23:55:18 +0200 Subject: Fix calculation of end bit --- src/shape.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shape.c b/src/shape.c index e5c568c..6784ee3 100644 --- a/src/shape.c +++ b/src/shape.c @@ -274,6 +274,7 @@ int split_words(struct wrap_line *boxes, PangoContext *pc, SCBlock *bl, PangoLogAttr *log_attrs; glong len_chars, i; size_t len_bytes, start; + int chars_done; /* Empty block? */ if ( text == NULL ) return 1; @@ -295,6 +296,7 @@ int split_words(struct wrap_line *boxes, PangoContext *pc, SCBlock *bl, //debug_log_attrs(len_chars, text, log_attrs); start = 0; + chars_done = 0; for ( i=0; i start ) { + if ( i > chars_done ) { size_t l = strlen(text+start); -- cgit v1.2.3