Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
e495e7e3
Commit
e495e7e3
authored
Jan 31, 2005
by
Aric Stewart
Committed by
Alexandre Julliard
Jan 31, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Setting a record to an empty string is the same as making it null.
parent
026b786e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
record.c
dlls/msi/record.c
+2
-2
record.c
dlls/msi/tests/record.c
+4
-0
No files found.
dlls/msi/record.c
View file @
e495e7e3
...
...
@@ -455,7 +455,7 @@ UINT MSI_RecordSetStringA( MSIRECORD *rec, unsigned int iField, LPCSTR szValue )
return
ERROR_INVALID_FIELD
;
MSI_FreeField
(
&
rec
->
fields
[
iField
]
);
if
(
szValue
)
if
(
szValue
&&
szValue
[
0
]
)
{
len
=
MultiByteToWideChar
(
CP_ACP
,
0
,
szValue
,
-
1
,
NULL
,
0
);
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
...
...
@@ -501,7 +501,7 @@ UINT MSI_RecordSetStringW( MSIRECORD *rec, unsigned int iField, LPCWSTR szValue
MSI_FreeField
(
&
rec
->
fields
[
iField
]
);
if
(
szValue
)
if
(
szValue
&&
szValue
[
0
]
)
{
len
=
lstrlenW
(
szValue
)
+
1
;
str
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
));
...
...
dlls/msi/tests/record.c
View file @
e495e7e3
...
...
@@ -123,6 +123,10 @@ void test_msirecord(void)
ok
(
r
==
ERROR_SUCCESS
,
"Failed to set null string at 0
\n
"
);
r
=
MsiRecordIsNull
(
h
,
0
);
ok
(
r
==
TRUE
,
"null string not null field
\n
"
);
r
=
MsiRecordSetString
(
h
,
0
,
""
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to set empty string at 0
\n
"
);
r
=
MsiRecordIsNull
(
h
,
0
);
ok
(
r
==
TRUE
,
"null string not null field
\n
"
);
r
=
MsiRecordSetString
(
h
,
0
,
str
);
ok
(
r
==
ERROR_SUCCESS
,
"Failed to set string at 0
\n
"
);
r
=
MsiRecordGetInteger
(
h
,
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