From 15b9a39b6085f9382e1907ef769a50aee716e839 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 16 Feb 2026 11:27:49 +0100 Subject: Make replacing of mismatching single quotes work (#2232) Fixes a logic error in the string handling that led to dead code before. --- lib/perfdata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/perfdata.c b/lib/perfdata.c index 138df53b..f4eaf843 100644 --- a/lib/perfdata.c +++ b/lib/perfdata.c @@ -39,7 +39,7 @@ char *pd_to_string(mp_perfdata pd) { } else { // we have an illegal single quote in the string // replace it silently instead of complaining - for (char *ptr = pd.label; *ptr == '\0'; ptr++) { + for (char *ptr = pd.label; *ptr != '\0'; ptr++) { if (*ptr == '\'') { *ptr = '_'; } -- cgit v1.2.3-74-g34f1