Commit c7e36d8b authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

msi: Unescape ^Q^Y sequences in text archives.

parent e2ba5dce
......@@ -575,6 +575,11 @@ static void msi_parse_line(LPWSTR *line, LPWSTR **entries, DWORD *num_entries, D
while (chars_left && *ptr != '\t' && *ptr != '\n' && *ptr != '\r')
{
if (!*ptr) *ptr = '\n'; /* convert embedded nulls to \n */
if (ptr > *line && *ptr == '\x19' && *(ptr - 1) == '\x11')
{
*ptr = '\n';
*(ptr - 1) = '\r';
}
ptr++;
chars_left--;
}
......
......@@ -9259,7 +9259,7 @@ static void test_embedded_nulls(void)
"Dialog\tText\n"
"s72\tL0\n"
"Control\tDialog\n"
"LicenseAgreementDlg\ttext\0text";
"LicenseAgreementDlg\ttext\x11\x19text\0text";
UINT r, sz;
MSIHANDLE hdb, hrec;
char buffer[32];
......@@ -9280,7 +9280,7 @@ static void test_embedded_nulls(void)
sz = sizeof(buffer);
r = MsiRecordGetStringA( hrec, 1, buffer, &sz );
ok( r == ERROR_SUCCESS, "failed to get string %u\n", r );
ok( !memcmp( "text\ntext", buffer, sizeof("text\ntext") - 1 ), "wrong buffer contents \"%s\"\n", buffer );
ok( !memcmp( "text\r\ntext\ntext", buffer, sizeof("text\r\ntext\ntext") - 1 ), "wrong buffer contents \"%s\"\n", buffer );
MsiCloseHandle( hrec );
MsiCloseHandle( hdb );
......
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