diff --git a/src/output-json-stats.c b/src/output-json-stats.c index 436d621ac4..0b99948b36 100644 --- a/src/output-json-stats.c +++ b/src/output-json-stats.c @@ -68,6 +68,8 @@ static json_t *OutputStats2Json(json_t *js, const char *key) const char *dot = index(key, '.'); if (dot == NULL) return NULL; + if (*(dot + 1) == '.' && *(dot + 2) != '\0') + dot = index(dot + 2, '.'); size_t predot_len = (dot - key) + 1; char s[predot_len];