diff options
author | Sadie Powell <sadie@witchery.services> | 2023-02-19 11:18:36 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2023-02-19 11:21:58 +0000 |
commit | ebe3fd7e571b0f258ccd7c0d8b843e514d63dbc6 (patch) | |
tree | 62a43ac8fcc8144e9e527ac735c1f9b466c9e7c7 /src | |
parent | 885462d98e2dd3753b2992ce6fd6084340f86eee (diff) | |
parent | 1c9b34190ed602f09055afb910ddb4c664f71afe (diff) |
Merge branch '2.0' into 2.1.
Diffstat (limited to 'src')
-rw-r--r-- | src/config.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/config.cpp b/src/config.cpp index dc8586d46..8447a8a16 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -942,5 +942,10 @@ void Conf::LoadConf(File &file) if (!itemname.empty() || !wordbuffer.empty()) throw ConfigException("Unexpected garbage at end of file: " + file.GetName()); if (!block_stack.empty()) - throw ConfigException("Unterminated block at end of file: " + file.GetName() + ". Block was opened on line " + stringify(block_stack.top()->linenum)); + { + if (block_stack.top()) + throw ConfigException("Unterminated block at end of file: " + file.GetName() + ". Block was opened on line " + stringify(block_stack.top()->linenum)); + else + throw ConfigException("Unterminated commented block at end of file: " + file.GetName()); + } } |