diff options
| author | Ben Winston | 2024-06-18 11:05:46 -0400 |
|---|---|---|
| committer | Ben Winston | 2024-06-18 11:05:46 -0400 |
| commit | 743add75f6cdb34db001a4ac439a75e9ec4fecc4 (patch) | |
| tree | 78365398dc00e6ca88edd16c975c94042d416753 /booki.c | |
| parent | d252eded0f04f1628f37cb2766579f8402932e87 (diff) | |
bugfix: don't print an extra newline if there's no raw fields
Diffstat (limited to 'booki.c')
| -rw-r--r-- | booki.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -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; |
