From: Sebastian Harl Date: Mon, 6 Jan 2014 22:32:31 +0000 (+0100) Subject: sysdb: Append newlines to lines read from readline(). X-Git-Tag: sysdb-0.1.0~247 X-Git-Url: https://git.tokkee.org/?p=sysdb.git;a=commitdiff_plain;h=bc2e98d50f275471345c749e4d951a309a7f14a7 sysdb: Append newlines to lines read from readline(). Else, whitespace will be missing in multi-line commands. --- diff --git a/src/tools/sysdb/input.c b/src/tools/sysdb/input.c index 0513ee0..72e360c 100644 --- a/src/tools/sysdb/input.c +++ b/src/tools/sysdb/input.c @@ -75,9 +75,10 @@ input_readline(sdb_strbuf_t *buf) if (! line) return 0; - len = strlen(line); + len = strlen(line) + 1; sdb_strbuf_append(buf, line); + sdb_strbuf_append(buf, "\n"); free(line); return len; } /* input_readline */