Skip to content

Commit

Permalink
Remove quotes from config values if found.
Browse files Browse the repository at this point in the history
  • Loading branch information
g4klx committed Jan 29, 2018
1 parent 0a101b4 commit b694f85
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion Conf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,14 @@ bool CConf::read()
char* value = ::strtok(NULL, "\r\n");
if (value == NULL)
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 (::strcmp(key, "Callsign") == 0) {
// Convert the callsign to upper case
Expand Down

0 comments on commit b694f85

Please sign in to comment.