diff options
author | Thomas White <taw@physics.org> | 2019-10-05 09:59:17 +0200 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2019-10-05 17:03:43 +0200 |
commit | 25c7cb2c23551b6baa70ad6642602c30ecc1a7b7 (patch) | |
tree | 41300327bbaff8dc537b429e7efe2d430125680e | |
parent | 1d7819d86f7aa2f21c8ef1b1c2a654ff9f0208b1 (diff) |
narrative_pos_trail_to_offset: Consider end of run as within run
-rw-r--r-- | libstorycode/narrative_render_cairo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libstorycode/narrative_render_cairo.c b/libstorycode/narrative_render_cairo.c index 9faacf7..53011cd 100644 --- a/libstorycode/narrative_render_cairo.c +++ b/libstorycode/narrative_render_cairo.c @@ -206,7 +206,7 @@ size_t narrative_pos_trail_to_offset(Narrative *n, int i, int offs, int trail) pos = 0; for ( run=0; run<item->n_runs; run++ ) { pos += strlen(item->runs[run].text); - if ( pos > offs ) { + if ( pos >= offs ) { glong char_offs; char *ptr; char_offs = g_utf8_pointer_to_offset(item->runs[run].text, |