Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Iniparser
提交
5720a4cd
T
Third Party Iniparser
项目概览
OpenHarmony
/
Third Party Iniparser
10 个月 前同步成功
通知
0
Star
24
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Iniparser
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
5720a4cd
编写于
8月 30, 2016
作者:
E
Emmanuel Leblond
提交者:
GitHub
8月 30, 2016
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #77 from ndevilla/issue-73
Fix issue #73
上级
67dd482f
0f47c567
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
10 addition
and
3 deletion
+10
-3
src/iniparser.c
src/iniparser.c
+4
-3
test/ressources/bad_ini/ends_well.ini
test/ressources/bad_ini/ends_well.ini
+6
-0
未找到文件。
src/iniparser.c
浏览文件 @
5720a4cd
...
...
@@ -689,6 +689,7 @@ dictionary * iniparser_load(const char * ininame)
int
len
;
int
lineno
=
0
;
int
errs
=
0
;
int
mem_err
=
0
;
dictionary
*
dict
;
...
...
@@ -747,12 +748,12 @@ dictionary * iniparser_load(const char * ininame)
break
;
case
LINE_SECTION
:
errs
=
dictionary_set
(
dict
,
section
,
NULL
);
mem_err
=
dictionary_set
(
dict
,
section
,
NULL
);
break
;
case
LINE_VALUE
:
sprintf
(
tmp
,
"%s:%s"
,
section
,
key
);
errs
=
dictionary_set
(
dict
,
tmp
,
val
)
;
mem_err
=
dictionary_set
(
dict
,
tmp
,
val
)
;
break
;
case
LINE_ERROR
:
...
...
@@ -768,7 +769,7 @@ dictionary * iniparser_load(const char * ininame)
}
memset
(
line
,
0
,
ASCIILINESZ
);
last
=
0
;
if
(
errs
<
0
)
{
if
(
mem_err
<
0
)
{
fprintf
(
stderr
,
"iniparser: memory allocation failure
\n
"
);
break
;
}
...
...
test/ressources/bad_ini/ends_well.ini
0 → 100644
浏览文件 @
5720a4cd
#
# This dict contains an error but ends up with a correct entry
#
[section]
error
is
here
a
=
b
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录