Commit 42caac84 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

msi: Correctly parse double quotes in the token value.

This fixes an installer that passes to InstallProduct a command line like PROPERTY1="Installing ""Product name"" version 8.0" PROPERTY2=1 PROPERTY3=1 In this case properties PROPERTY2 and PROPERTY3 were not recognized and that led to an installation failure when a custom action didn't see them as set. Signed-off-by: 's avatarDmitry Timoshkov <dmitry@baikal.ru>
parent 1b3087e7
......@@ -245,7 +245,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes )
{
case '"':
state = state_quote;
if (in_quotes) count--;
if (in_quotes && p[1] != '\"') count--;
else count++;
break;
case ' ':
......@@ -329,7 +329,7 @@ UINT msi_parse_command_line( MSIPACKAGE *package, LPCWSTR szCommandLine,
ptr2 = strchrW( ptr, '=' );
if (!ptr2) return ERROR_INVALID_COMMAND_LINE;
len = ptr2 - ptr;
if (!len) return ERROR_INVALID_COMMAND_LINE;
......
......@@ -4718,9 +4718,7 @@ static void test_propcase(void)
r = MsiInstallProductA(msifile, "BLAHBLAH=\"Copyright \"\"My Company\"\" 2015\" MyProp=42");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
todo_wine
ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
todo_wine
ok(delete_pf("msitest", FALSE), "Directory not created\n");
error:
......
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