msi: Pass correct length to GetDateFormatW.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
oldstable
Hans Leidekker 2017-09-19 19:37:48 +02:00 committed by Alexandre Julliard
parent e1e668d41f
commit fdac39f697
1 changed files with 2 additions and 2 deletions

View File

@ -2282,7 +2282,7 @@ static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name )
if (!length)
return NULL;
buffer = msi_alloc(length * sizeof(WCHAR));
GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, buffer, sizeof(WCHAR));
GetDateFormatW(LOCALE_USER_DEFAULT, DATE_SHORTDATE, NULL, NULL, buffer, length);
row = MSI_CreateRecord(1);
if (!row)
@ -2297,7 +2297,7 @@ static MSIRECORD *msi_get_property_row( MSIDATABASE *db, LPCWSTR name )
if (!length)
return NULL;
buffer = msi_alloc(length * sizeof(WCHAR));
GetTimeFormatW(LOCALE_USER_DEFAULT, TIME_NOTIMEMARKER, NULL, NULL, buffer, sizeof(WCHAR));
GetTimeFormatW(LOCALE_USER_DEFAULT, TIME_NOTIMEMARKER, NULL, NULL, buffer, length);
row = MSI_CreateRecord(1);
if (!row)