msi: Fix buffer length value returned by MSI_RecordGetStringW on null and empty strings.

This commit is contained in:
Nicolas Le Cam 2009-04-16 01:09:09 +02:00 committed by Alexandre Julliard
parent edac581d6a
commit e00d864a35
2 changed files with 0 additions and 3 deletions

View File

@ -444,7 +444,6 @@ UINT MSI_RecordGetStringW(MSIRECORD *rec, UINT iField,
lstrcpynW(szValue, rec->fields[iField].u.szwVal, *pcchValue);
break;
case MSIFIELD_NULL:
len = 1;
if( szValue && *pcchValue > 0 )
szValue[0] = 0;
default:

View File

@ -140,7 +140,6 @@ static void test_msirecord(void)
r = MsiRecordGetStringW(h, 0, bufW, &sz);
ok(r == ERROR_SUCCESS, "Failed to get string at 0\n");
ok(bufW[0] == 0, "MsiRecordGetStringW returned the wrong string\n");
todo_wine
ok(sz == 0, "MsiRecordGetStringW returned the wrong length\n");
r = MsiRecordSetString(h, 0, "");
ok(r == ERROR_SUCCESS, "Failed to set empty string at 0\n");
@ -159,7 +158,6 @@ static void test_msirecord(void)
r = MsiRecordGetStringW(h, 0, bufW, &sz);
ok(r == ERROR_SUCCESS, "Failed to get string at 0\n");
ok(bufW[0] == 0, "MsiRecordGetStringW returned the wrong string\n");
todo_wine
ok(sz == 0, "MsiRecordGetStringW returned the wrong length\n");
/* same record, but add a string to it */