Browse Source

fix: call add_line only if normal line

master
n0m1s 6 years ago
parent
commit
325e516a63
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      settings.cpp

+ 5
- 4
settings.cpp View File

@ -104,14 +104,15 @@ Settings const* Settings::load(char const* settings_filename)
if(c == '\n') if(c == '\n')
{ {
if(!is_comment_line && !is_section_line)
settings->add_line(current_section.to_string(),
current_key.to_string(),
current_val.to_string());
first_char_of_line = true; first_char_of_line = true;
is_comment_line = false; is_comment_line = false;
is_section_line = false; is_section_line = false;
settings->add_line(current_section.to_string(),
current_key.to_string(),
current_val.to_string());
current_key.clear(); current_key.clear();
current_val.clear(); current_val.clear();
write_to_key = true; write_to_key = true;


Loading…
Cancel
Save