提交 a4055e42 编写于 作者: J jp9000

fixed a bug writing to config files where it would use a brace instead of a...

fixed a bug writing to config files where it would use a brace instead of a bracket when creating a section
上级 0c3ed3ce
......@@ -244,6 +244,8 @@ int config_open(config_t *config, const char *file,
*config = bmalloc(sizeof(struct config_data));
memset(*config, 0, sizeof(struct config_data));
(*config)->file = bstrdup(file);
errorcode = config_parse(&(*config)->sections, file, always_open);
if (errorcode != CONFIG_SUCCESS) {
......@@ -284,7 +286,7 @@ int config_save(config_t config)
if (i) dstr_cat(&str, "\n");
dstr_cat(&str, "{");
dstr_cat(&str, "[");
dstr_cat(&str, section->name);
dstr_cat(&str, "]\n");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册