From ff2a76910f4b4da1741e9888f673343099784045 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 13 Feb 2023 18:15:59 +0100 Subject: Adding upstream version 1.38.1. Signed-off-by: Daniel Baumann --- web/api/formatters/value/value.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'web/api/formatters/value/value.c') diff --git a/web/api/formatters/value/value.c b/web/api/formatters/value/value.c index 915d58ac9..fd9188057 100644 --- a/web/api/formatters/value/value.c +++ b/web/api/formatters/value/value.c @@ -22,6 +22,7 @@ inline NETDATA_DOUBLE rrdr2value(RRDR *r, long i, RRDR_OPTIONS options, int *all if(unlikely(options & RRDR_OPTION_PERCENTAGE)) { total = 0; for (c = 0; c < used; c++) { + if(unlikely(!(r->od[c] & RRDR_DIMENSION_QUERIED))) continue; NETDATA_DOUBLE n = cn[c]; if(likely((options & RRDR_OPTION_ABSOLUTE) && n < 0)) @@ -37,6 +38,7 @@ inline NETDATA_DOUBLE rrdr2value(RRDR *r, long i, RRDR_OPTIONS options, int *all // for each dimension for (c = 0; c < used; c++) { if(unlikely(r->od[c] & RRDR_DIMENSION_HIDDEN)) continue; + if(unlikely(!(r->od[c] & RRDR_DIMENSION_QUERIED))) continue; if(unlikely((options & RRDR_OPTION_NONZERO) && !(r->od[c] & RRDR_DIMENSION_NONZERO))) continue; NETDATA_DOUBLE n = cn[c]; -- cgit v1.2.3