diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2023-12-10 01:05:06 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2023-12-10 01:05:06 -0500 |
commit | d0ed95e9e54770972db247e197787ec611607cf1 (patch) | |
tree | dd486cd4aa6d0c72b2b599342c22f3838a94def4 /src | |
parent | c9a9073755537aec9024635147a74a1452b520cf (diff) | |
download | stasis-d0ed95e9e54770972db247e197787ec611607cf1.tar.gz |
Remove trailing whitespace from key name
Diffstat (limited to 'src')
-rw-r--r-- | src/ini.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -309,10 +309,12 @@ struct INIFILE *ini_open(const char *filename) { line[strlen(line) - 2] = '\0'; // Create new named section - ini_section_record(&ini, &line[1]); + strip(name); + ini_section_record(&ini, name); // Record the name of the section. This is used until another section is found. - strcpy(current_section, &line[1]); + strcpy(current_section, name); + guard_free(name) continue; } |