@joebigelow / wix-1 / commits / 66673766

Improve whitespace handling in Burn conditions.

Fixes #4702

Sean Hall committed Jul 6, 2021 at 10:58 UTC 666737664cef051fa5a118bb8d14f7708b7db8af
2 files changed +3 -1
src/burn/engine/condition.cpp
+1 -1
@@ -525,7 +525,7 @@ static HRESULT NextSymbol(
525 while (L'\0' != pContext->wzRead[0])
526 {
527 ::GetStringTypeW(CT_CTYPE1, pContext->wzRead, 1, &charType);
528 - if (0 == (C1_BLANK & charType))
528 + if (0 == ((C1_BLANK | C1_SPACE) & charType))
529 {
530 break; // no blank, done
531 }
src/burn/test/BurnUnitTest/VariableTest.cpp
+2
@@ -261,6 +261,8 @@ namespace Bootstrapper
261 Assert::True(EvaluateConditionHelper(&variables, L"PROP1 = \"VAL1\""));
262 Assert::False(EvaluateConditionHelper(&variables, L"NONE = \"NOT\""));
263 Assert::False(EvaluateConditionHelper(&variables, L"PROP1 <> \"VAL1\""));
264 + Assert::False(EvaluateConditionHelper(&variables, L"PROP1 <>\n\"VAL1\""));
265 + Assert::True(EvaluateConditionHelper(&variables, L"PROP1 <> \"VAL1\nVAL2\""));
266 Assert::False(EvaluateConditionHelper(&variables, L"PROP1 ~<> \"VAL1\""));
267 Assert::False(EvaluateConditionHelper(&variables, L"PROP1 ~<> \"Val1\""));
268 Assert::True(EvaluateConditionHelper(&variables, L"NONE <> \"NOT\""));