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

msi: Fix parsing of an empty property followed by a non-empty property.

parent ecf217bb
......@@ -231,6 +231,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes )
if (!count) goto done;
in_quotes = 1;
ignore = 1;
len++;
break;
case '"':
state = state_quote;
......@@ -258,6 +259,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes )
state = state_whitespace;
if (!count) goto done;
in_quotes = 1;
len++;
break;
default:
if (!count) in_quotes = 0;
......@@ -276,8 +278,9 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes )
break;
case ' ':
state = state_whitespace;
if (!count) goto done;
if (!count || (count > 1 && !len)) goto done;
in_quotes = 1;
len++;
break;
default:
state = state_token;
......
......@@ -6346,6 +6346,10 @@ static void test_command_line_parsing(void)
r = MsiInstallProductA(msifile, cmd);
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
cmd = "Q=\"\" P=\"one\"";
r = MsiInstallProductA(msifile, cmd);
ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
DeleteFile(msifile);
RemoveDirectory("msitest");
}
......
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