aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--booki.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/booki.c b/booki.c
index 3b87585..77cea17 100644
--- a/booki.c
+++ b/booki.c
@@ -515,6 +515,8 @@ void write_book(BOOK book, FILE *output) {
fwrite(str, 1, size, output);
} else if (datafield.type == booki_raw) {
string_field = get_string_field(book, datafield.name);
+ if (!string_field.ptr)
+ continue;
size = sprintf(str, "%.*s\n", string_field.len, string_field.ptr);
fwrite(str, 1, size, output);
ES* next = string_field.next;