From ff4e8a95076673b2611a0d7f7bdb50335d972696 Mon Sep 17 00:00:00 2001 From: Chipster Date: Sun, 30 Apr 2023 07:44:05 -0500 Subject: [PATCH] Fixes configuration bug; when "Symbol=" value contains a valid APRS literal "#", it was parsed as a comment and not honored (now has more strict checking). --- Conf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Conf.cpp b/Conf.cpp index ef3550f..59c96ff 100644 --- a/Conf.cpp +++ b/Conf.cpp @@ -262,8 +262,8 @@ bool CConf::read() char *p; // if value is not quoted, remove after # (to make comment) - if ((p = strchr(value, '#')) != NULL) - *p = '\0'; + if ((p = strchr(value, '#')) != NULL && p == value) + *p = '\0'; // remove trailing tab/space for (p = value + strlen(value) - 1U; p >= value && (*p == '\t' || *p == ' '); p--)