diff options
| author | BossCode45 <human.cyborg42@gmail.com> | 2023-06-21 17:18:22 +1200 |
|---|---|---|
| committer | BossCode45 <human.cyborg42@gmail.com> | 2023-06-21 17:18:22 +1200 |
| commit | 5c799ffa098f6c9b6d88513c2662968a9f5aaa41 (patch) | |
| tree | 16124789c04fbe52b2b51266e299f7d26259955f /config.cpp | |
| parent | 185015b39b8db953b8034f29724ef03de09e7ea1 (diff) | |
| download | YATwm-5c799ffa098f6c9b6d88513c2662968a9f5aaa41.tar.gz YATwm-5c799ffa098f6c9b6d88513c2662968a9f5aaa41.zip | |
feat: Made a proper arg parser
Now supports quotes properly, and uses \ to escape characters
Diffstat (limited to 'config.cpp')
| -rw-r--r-- | config.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -98,6 +98,7 @@ std::vector<Err> Config::loadFromFile(std::string path) int line = 0; while(getline(config, cmd)) { + line++; if(cmd.size() == 0) continue; if(cmd.at(0) == '#') @@ -111,7 +112,6 @@ std::vector<Err> Config::loadFromFile(std::string path) errs.push_back({e.code, "Error in config (line " + std::to_string(line) + "): " + std::to_string(e.code) + "\n\tMessage: " + e.message}); } - line++; } loaded = true; return errs; |
