diff options
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.c b/src/util.c index 861f9eaa43..0cd78f6561 100644 --- a/src/util.c +++ b/src/util.c @@ -495,6 +495,9 @@ int write_one_line_file(const char *fn, const char *line) { goto finish; } + if (!endswith(line, "\n")) + fputc('\n', f); + r = 0; finish: fclose(f); |