diff options
author | Thomas White <taw@bitwiz.me.uk> | 2023-08-28 18:04:10 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2023-08-28 18:04:10 +0200 |
commit | e46258254ab6c06717894ce14cbb2a76e5a06a0c (patch) | |
tree | 972b152768d2747421a182755f02fda7a84b0b75 | |
parent | 632f37dcc5f4fe302eda4c9fd3117e3a00a35930 (diff) |
-rw-r--r-- | libstorycode/narrative_render_cairo.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libstorycode/narrative_render_cairo.c b/libstorycode/narrative_render_cairo.c index ee5e67d..2ab808d 100644 --- a/libstorycode/narrative_render_cairo.c +++ b/libstorycode/narrative_render_cairo.c @@ -187,6 +187,9 @@ size_t narrative_pos_trail_to_offset(Narrative *n, int i, int offs, int trail) run = narrative_which_run(item, offs, &run_offs); + assert(item != NULL); + assert(run < item->n_runs); + assert(item->runs[run].text != NULL); char_offs = g_utf8_pointer_to_offset(item->runs[run].text, item->runs[run].text+run_offs); char_offs += trail; |