diff options
author | Luke Bratch <luke@bratch.co.uk> | 2019-05-29 21:05:31 +0100 |
---|---|---|
committer | Luke Bratch <luke@bratch.co.uk> | 2019-05-29 21:05:31 +0100 |
commit | c5a9bc507e9724090a63cdfb3b6df13a0ff74582 (patch) | |
tree | 744786fb38a68342fa1ded53e263ff0c2813c134 /logging.c | |
parent | 92d106733468893d921dc678296a6716ddf979a4 (diff) |
Ensure writes to file are unformatted strings.
Diffstat (limited to 'logging.c')
-rw-r--r-- | logging.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -203,7 +203,7 @@ int logline(char *str, char *ournick, char *basedir, int type) { debugprint("logline(): Complete log string to write: '%s', length '%ld'.\n", line, strlen(line)); // Write complete line to file - if ((bytes = fprintf(fp, line)) < 0) { + if ((bytes = fprintf(fp, "%s", line)) < 0) { printf("error: could not write to log file.\n"); exit(1); } |