mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-23 00:35:53 +08:00
Remove quotes from config values if found.
This commit is contained in:
7
Conf.cpp
7
Conf.cpp
@@ -274,6 +274,13 @@ bool CConf::read()
|
|||||||
if (value == NULL)
|
if (value == NULL)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Remove quotes from the value
|
||||||
|
size_t len = ::strlen(value);
|
||||||
|
if (len > 1U && *value == '"' && value[len - 1U] == '"') {
|
||||||
|
value[len - 1U] = '\0';
|
||||||
|
value++;
|
||||||
|
}
|
||||||
|
|
||||||
if (section == SECTION_GENERAL) {
|
if (section == SECTION_GENERAL) {
|
||||||
if (::strcmp(key, "Callsign") == 0) {
|
if (::strcmp(key, "Callsign") == 0) {
|
||||||
// Convert the callsign to upper case
|
// Convert the callsign to upper case
|
||||||
|
|||||||
Reference in New Issue
Block a user