From 89f4e9b768cee6de5396adc7cf2c0766ee4d5df9 Mon Sep 17 00:00:00 2001 From: Sonja Kolen Date: Wed, 1 Aug 2018 14:36:31 +0200 Subject: [PATCH] json_format: fixed a bug, int values are now saved in the data.i field instead of data.f --- lib/formats/json.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/formats/json.c b/lib/formats/json.c index a41b94531..20f0202f1 100644 --- a/lib/formats/json.c +++ b/lib/formats/json.c @@ -164,7 +164,7 @@ static int json_unpack_sample(struct io *io, json_t *json_smp, struct sample *sm break; case JSON_INTEGER: - smp->data[i].f = json_integer_value(json_value); + smp->data[i].i = json_integer_value(json_value); sample_set_data_format(smp, i, SAMPLE_DATA_FORMAT_INT); break;