Don't try to print unterminated strings when loading configuration file.

This commit is contained in:
Nicholas Marriott 2013-03-22 10:41:57 +00:00
parent f19836550b
commit 8c545bbfa8

2
cfg.c
View File

@ -97,7 +97,7 @@ load_cfg(const char *path, struct cmd_ctx *ctxin, struct causelist *causes)
/* Trim \n. */ /* Trim \n. */
if (buf[len - 1] == '\n') if (buf[len - 1] == '\n')
len--; len--;
log_debug ("%s: %s", path, buf); log_debug("%s: %.*s", path, (int)len, buf);
/* Current line is the continuation of the previous one. */ /* Current line is the continuation of the previous one. */
if (line != NULL) { if (line != NULL) {