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
5437f4ce
Commit
5437f4ce
authored
Jul 27, 2008
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Jul 28, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Fix a crash on win9x (lpDefault is truncated inplace).
parent
5816c380
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
profile.c
dlls/kernel32/tests/profile.c
+10
-3
No files found.
dlls/kernel32/tests/profile.c
View file @
5437f4ce
...
...
@@ -363,6 +363,7 @@ static void test_GetPrivateProfileString(void)
{
DWORD
ret
;
CHAR
buf
[
MAX_PATH
];
CHAR
def_val
[
MAX_PATH
];
CHAR
path
[
MAX_PATH
];
CHAR
windir
[
MAX_PATH
];
LPSTR
tempfile
;
...
...
@@ -416,14 +417,18 @@ static void test_GetPrivateProfileString(void)
/* lpAppName is empty, lpDefault has trailing blank characters */
lstrcpyA
(
buf
,
"kumquat"
);
ret
=
GetPrivateProfileStringA
(
""
,
"name1"
,
"default "
,
/* lpDefault must be writeable (trailing blanks are removed inplace in win9x) */
lstrcpyA
(
def_val
,
"default "
);
ret
=
GetPrivateProfileStringA
(
""
,
"name1"
,
def_val
,
buf
,
MAX_PATH
,
filename
);
ok
(
ret
==
7
,
"Expected 7, got %d
\n
"
,
ret
);
ok
(
!
lstrcmpA
(
buf
,
"default"
),
"Expected
\"
default
\"
, got
\"
%s
\"\n
"
,
buf
);
/* lpAppName is empty, many blank characters in lpDefault */
lstrcpyA
(
buf
,
"kumquat"
);
ret
=
GetPrivateProfileStringA
(
""
,
"name1"
,
"one two "
,
/* lpDefault must be writeable (trailing blanks are removed inplace in win9x) */
lstrcpyA
(
def_val
,
"one two "
);
ret
=
GetPrivateProfileStringA
(
""
,
"name1"
,
def_val
,
buf
,
MAX_PATH
,
filename
);
ok
(
ret
==
7
,
"Expected 7, got %d
\n
"
,
ret
);
ok
(
!
lstrcmpA
(
buf
,
"one two"
),
"Expected
\"
one two
\"
, got
\"
%s
\"\n
"
,
buf
);
...
...
@@ -473,7 +478,9 @@ static void test_GetPrivateProfileString(void)
/* lpKeyName is empty, lpDefault has trailing blank characters */
lstrcpyA
(
buf
,
"kumquat"
);
ret
=
GetPrivateProfileStringA
(
"section1"
,
""
,
"default "
,
/* lpDefault must be writeable (trailing blanks are removed inplace in win9x) */
lstrcpyA
(
def_val
,
"default "
);
ret
=
GetPrivateProfileStringA
(
"section1"
,
""
,
def_val
,
buf
,
MAX_PATH
,
filename
);
ok
(
ret
==
7
,
"Expected 7, got %d
\n
"
,
ret
);
ok
(
!
lstrcmpA
(
buf
,
"default"
),
"Expected
\"
default
\"
, got
\"
%s
\"\n
"
,
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