From 743add75f6cdb34db001a4ac439a75e9ec4fecc4 Mon Sep 17 00:00:00 2001 From: Ben Winston Date: Tue, 18 Jun 2024 11:05:46 -0400 Subject: bugfix: don't print an extra newline if there's no raw fields --- booki.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.2.3