aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.me.uk>2020-01-25 16:40:43 +0100
committerThomas White <taw@bitwiz.me.uk>2020-01-25 16:40:43 +0100
commitf51ddb046b1af7c4fdd731d8c3bf302b7708f80b (patch)
tree36dc3ea62eb90498c5ecd5b612690589610e6821
parentbe23d0785112210fca9d78ebea6c86d98c4c1d1d (diff)
Don't write empty runs
-rw-r--r--libstorycode/storycode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libstorycode/storycode.c b/libstorycode/storycode.c
index 8401e9b..9dfb49f 100644
--- a/libstorycode/storycode.c
+++ b/libstorycode/storycode.c
@@ -169,6 +169,7 @@ static void write_para(GOutputStream *fh, struct text_run *runs, int n_runs)
{
int i;
for ( i=0; i<n_runs; i++ ) {
+ if ( strlen(runs[i].text) == 0 ) continue;
write_partial_run(fh, &runs[i], 0, strlen(runs[i].text));
}
}