mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 15:12:11 +02:00
Merge pull request #199 from ailin-nemui/config-parser
Make config parser more robust
This commit is contained in:
commit
eb0f09073c
22 changed files with 119 additions and 66 deletions
|
|
@ -104,6 +104,12 @@ void config_node_set_str(CONFIG_REC *rec, CONFIG_NODE *parent, const char *key,
|
|||
return;
|
||||
}
|
||||
|
||||
if (node != NULL && !has_node_value(node)) {
|
||||
g_critical("Expected scalar node at `..%s/%s' was of complex type. Corrupt config?",
|
||||
parent->key, key);
|
||||
config_node_remove(rec, parent, node);
|
||||
node = NULL;
|
||||
}
|
||||
if (node != NULL) {
|
||||
if (g_strcmp0(node->value, value) == 0)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue