Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
00ced5e3
Commit
00ced5e3
authored
Mar 04, 2005
by
Huw Davies
Committed by
Alexandre Julliard
Mar 04, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regression in GetPrivateProfileSection for lines without an '='.
Add test.
parent
486fd1f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
profile.c
dlls/kernel/profile.c
+1
-1
profile.c
dlls/kernel/tests/profile.c
+8
-0
No files found.
dlls/kernel/profile.c
View file @
00ced5e3
...
...
@@ -863,7 +863,7 @@ static INT PROFILE_GetSection( PROFILESECTION *section, LPCWSTR section_name,
if
(
len
<=
2
)
break
;
if
(
!*
key
->
name
)
continue
;
/* Skip empty lines */
if
(
IS_ENTRY_COMMENT
(
key
->
name
))
continue
;
/* Skip comments */
if
(
!
key
->
value
)
continue
;
/* Skip lines w.o. '=' */
if
(
!
return_values
&&
!
key
->
value
)
continue
;
/* Skip lines w.o. '=' */
PROFILE_CopyEntry
(
buffer
,
key
->
name
,
len
-
1
,
0
);
len
-=
strlenW
(
buffer
)
+
1
;
buffer
+=
strlenW
(
buffer
)
+
1
;
...
...
dlls/kernel/tests/profile.c
View file @
00ced5e3
...
...
@@ -114,6 +114,14 @@ void test_profile_string()
/* and test */
ok
(
!
strcmp
(
buf
,
"name1,name2,name4"
),
"wrong keys returned: %s
\n
"
,
buf
);
ret
=
GetPrivateProfileSectionA
(
"s"
,
buf
,
sizeof
(
buf
),
TESTFILE2
);
for
(
p
=
buf
+
strlen
(
buf
)
+
1
;
*
p
;
p
+=
strlen
(
p
)
+
1
)
p
[
-
1
]
=
','
;
/* and test */
ok
(
!
strcmp
(
buf
,
"name1=val1,name2=,name3,name4=val4"
),
"wrong section returned: %s
\n
"
,
buf
);
/* add a new key to test that the file is quite usable */
WritePrivateProfileStringA
(
"s"
,
"name5"
,
"val5"
,
TESTFILE2
);
ret
=
GetPrivateProfileStringA
(
"s"
,
NULL
,
""
,
buf
,
sizeof
(
buf
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment