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
470a3f93
Commit
470a3f93
authored
May 11, 2002
by
Andreas Mohr
Committed by
Alexandre Julliard
May 11, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make PROFILE_GetString account for default value in all cases.
parent
7f9cc2e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
profile.c
files/profile.c
+11
-5
No files found.
files/profile.c
View file @
470a3f93
...
...
@@ -846,8 +846,11 @@ static INT PROFILE_GetString( LPCSTR section, LPCSTR key_name,
if
(
!
buffer
)
return
0
;
if
(
!
def_val
)
def_val
=
""
;
if
(
key_name
&&
key_name
[
0
]
)
if
(
key_name
)
{
if
(
!
key_name
[
0
])
/* Win95 returns 0 on keyname "". Tested with Likse32 bon 000227 */
return
0
;
key
=
PROFILE_Find
(
&
CurProfile
->
section
,
section
,
key_name
,
FALSE
,
FALSE
);
PROFILE_CopyEntry
(
buffer
,
(
key
&&
key
->
value
)
?
key
->
value
:
def_val
,
len
,
FALSE
);
...
...
@@ -855,12 +858,15 @@ static INT PROFILE_GetString( LPCSTR section, LPCSTR key_name,
section
,
key_name
,
def_val
,
buffer
);
return
strlen
(
buffer
);
}
if
(
key_name
&&
!
(
key_name
[
0
]))
/* Win95 returns 0 on keyname "". Tested with Likse32 bon 000227 */
return
0
;
/* no "else" here ! */
if
(
section
&&
section
[
0
])
return
PROFILE_GetSection
(
CurProfile
->
section
,
section
,
buffer
,
len
,
{
PROFILE_GetSection
(
CurProfile
->
section
,
section
,
buffer
,
len
,
FALSE
,
FALSE
);
if
(
!
buffer
[
0
])
/* no luck -> def_val */
PROFILE_CopyEntry
(
buffer
,
def_val
,
len
,
FALSE
);
return
strlen
(
buffer
);
}
buffer
[
0
]
=
'\0'
;
return
0
;
}
...
...
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