Commit d3239926 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

Fix retrieval of nul records as strings.

parent 99c2b9a9
...@@ -261,6 +261,10 @@ UINT WINAPI MsiRecordGetStringA(MSIHANDLE handle, unsigned int iField, ...@@ -261,6 +261,10 @@ UINT WINAPI MsiRecordGetStringA(MSIHANDLE handle, unsigned int iField,
WideCharToMultiByte( CP_ACP, 0, rec->fields[iField].u.szwVal, -1, WideCharToMultiByte( CP_ACP, 0, rec->fields[iField].u.szwVal, -1,
szValue, *pcchValue, NULL, NULL); szValue, *pcchValue, NULL, NULL);
break; break;
case MSIFIELD_NULL:
len = 1;
if( *pcchValue > 0 )
szValue[0] = 0;
default: default:
ret = ERROR_INVALID_PARAMETER; ret = ERROR_INVALID_PARAMETER;
break; break;
...@@ -319,6 +323,10 @@ UINT WINAPI MsiRecordGetStringW(MSIHANDLE handle, unsigned int iField, ...@@ -319,6 +323,10 @@ UINT WINAPI MsiRecordGetStringW(MSIHANDLE handle, unsigned int iField,
len = lstrlenW( rec->fields[iField].u.szwVal ); len = lstrlenW( rec->fields[iField].u.szwVal );
lstrcpynW(szValue, rec->fields[iField].u.szwVal, *pcchValue); lstrcpynW(szValue, rec->fields[iField].u.szwVal, *pcchValue);
break; break;
case MSIFIELD_NULL:
len = 1;
if( *pcchValue > 0 )
szValue[0] = 0;
default: default:
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment