mirror of
https://github.com/g4klx/DMRGateway
synced 2025-12-23 23:05:38 +08:00
Remove quotes in the ini file.
This commit is contained in:
7
Conf.cpp
7
Conf.cpp
@@ -180,6 +180,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, "Daemon") == 0)
|
if (::strcmp(key, "Daemon") == 0)
|
||||||
m_daemon = ::atoi(value) == 1;
|
m_daemon = ::atoi(value) == 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user