From af6da1f0c5ab69f513100a7056ebc29a41c3521d Mon Sep 17 00:00:00 2001 From: kichikuou Date: Thu, 8 Jul 2021 17:12:42 +0900 Subject: [PATCH] Fix incorrect warning while parsing system3.ini Also fixes a typo in README.md. Fixes #12. --- README.md | 2 +- src/config.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3aca572..6e0f3cb 100644 --- a/README.md +++ b/README.md @@ -145,7 +145,7 @@ Here's the list of available game IDs and corresponding titles: ### Configuration file `system3.ini` Every option that can be set via the command line flags can also be configured -via the `ststem3.ini` file placed in the game folder. The following is an +via the `system3.ini` file placed in the game folder. The following is an example of `system3.ini` file: ``` [config] diff --git a/src/config.cpp b/src/config.cpp index ce9de38..d4731eb 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -90,8 +90,7 @@ void Config::load_ini() current_section = CONFIG; else WARNING(INIFILENAME ":%d Unknown section \"%s\"", lineno, val); - } - if (current_section == CONFIG) { + } else if (current_section == CONFIG) { if (sscanf(line, "noantialias = %s", val)) no_antialias = to_bool(val, lineno); else if (sscanf(line, "savedir = %s", val))