Commit 2ee784e6 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

msi: Make sure to reset the 'in_quotes' state in all cases.

parent 2d7f00c8
...@@ -255,8 +255,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes ) ...@@ -255,8 +255,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes )
len++; len++;
break; break;
default: default:
if (!count) in_quotes = FALSE; if (count) in_quotes = TRUE;
else in_quotes = TRUE;
len++; len++;
break; break;
} }
...@@ -277,8 +276,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes ) ...@@ -277,8 +276,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes )
break; break;
default: default:
state = state_token; state = state_token;
if (!count) in_quotes = FALSE; if (count) in_quotes = TRUE;
else in_quotes = TRUE;
len++; len++;
break; break;
} }
...@@ -287,6 +285,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes ) ...@@ -287,6 +285,7 @@ static int parse_prop( const WCHAR *str, WCHAR *value, int *quotes )
default: break; default: break;
} }
if (!ignore) *out++ = *p; if (!ignore) *out++ = *p;
if (!count) in_quotes = FALSE;
} }
done: done:
......
...@@ -4716,11 +4716,14 @@ static void test_propcase(void) ...@@ -4716,11 +4716,14 @@ static void test_propcase(void)
ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n"); ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
ok(delete_pf("msitest", FALSE), "Directory not created\n"); ok(delete_pf("msitest", FALSE), "Directory not created\n");
r = MsiInstallProductA(msifile, "BLAHBLAH=\"Copyright \"\"My Company\"\" 2015\" MyProp=42"); r = MsiInstallProductA(msifile, "Prop1=\"Copyright \"\"My Company\"\" 2015\" MyProp=42");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
ok(delete_pf("msitest", FALSE), "Directory not created\n");
r = MsiInstallProductA(msifile, "Prop1=\"\"\"install.exe\"\" /Install\" MyProp=\"42\"");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
todo_wine
ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n"); ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
todo_wine
ok(delete_pf("msitest", FALSE), "Directory not created\n"); ok(delete_pf("msitest", FALSE), "Directory not created\n");
error: 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