diff options
author | Thomas White <taw@bitwiz.me.uk> | 2020-01-25 16:40:43 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2020-01-25 16:40:43 +0100 |
commit | f51ddb046b1af7c4fdd731d8c3bf302b7708f80b (patch) | |
tree | 36dc3ea62eb90498c5ecd5b612690589610e6821 /libstorycode/storycode.c | |
parent | be23d0785112210fca9d78ebea6c86d98c4c1d1d (diff) |
Don't write empty runs
Diffstat (limited to 'libstorycode/storycode.c')
-rw-r--r-- | libstorycode/storycode.c | 1 |
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)); } } |