Add missing newline to avrorouter output

The schema was not terminated with a newline.
This commit is contained in:
Markus Mäkelä 2017-02-12 07:38:52 +02:00
parent 10e74225c0
commit 0b892c9714

View File

@ -848,13 +848,15 @@ GWBUF* read_avro_json_schema(const char *avrofile, const char* dir)
if (file)
{
int nread;
while ((nread = fread(buffer, 1, sizeof(buffer), file)) > 0)
while ((nread = fread(buffer, 1, sizeof(buffer) - 1, file)) > 0)
{
while (isspace(buffer[nread - 1]))
{
nread--;
}
buffer[nread++] = '\n';
GWBUF * newbuf = gwbuf_alloc_and_load(nread, buffer);
if (newbuf)