1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

json: properly handle EOF in json format

This commit is contained in:
Steffen Vogel 2018-10-22 13:11:05 +01:00
parent 2f0aebedc2
commit 30c15be7ae

View file

@ -333,6 +333,9 @@ int json_scan(struct io *io, struct sample *smps[], unsigned cnt)
FILE *f = io_stream_input(io);
for (i = 0; i < cnt; i++) {
if (feof(f))
return -1;
skip: json = json_loadf(f, JSON_DISABLE_EOF_CHECK, &err);
if (!json)
break;