From 785a434acb5a4f5ee1dc176338e526da4d53e630 Mon Sep 17 00:00:00 2001 From: Andrey Borodin Date: Wed, 19 Feb 2020 11:01:29 +0500 Subject: [PATCH] Fix percentile read (#122) --- sources/config_reader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sources/config_reader.c b/sources/config_reader.c index 500e5185..d6cea02d 100644 --- a/sources/config_reader.c +++ b/sources/config_reader.c @@ -327,9 +327,11 @@ od_config_reader_quantiles(od_config_reader_t *reader, char *value, double **qua return false; } *count += 1; - while (*c != ',') { + while (*c != '\0' && *c != ',') { c++; } + if (*c == '\0') + break; c++; } return true;