diff options
Diffstat (limited to 'src/engine/condition.cpp')
-rw-r--r-- | src/engine/condition.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/engine/condition.cpp b/src/engine/condition.cpp index 28391d2d..cd346680 100644 --- a/src/engine/condition.cpp +++ b/src/engine/condition.cpp | |||
@@ -439,6 +439,13 @@ static HRESULT ParseValue( | |||
439 | { | 439 | { |
440 | ExitOnRootFailure(hr, "Failed to find variable."); | 440 | ExitOnRootFailure(hr, "Failed to find variable."); |
441 | } | 441 | } |
442 | |||
443 | if (BURN_VARIANT_TYPE_FORMATTED == pValue->Type) | ||
444 | { | ||
445 | // TODO: actually format the value? | ||
446 | hr = BVariantChangeType(pValue, BURN_VARIANT_TYPE_STRING); | ||
447 | ExitOnRootFailure(hr, "Failed to change variable '%ls' type for condition '%ls'", pContext->NextSymbol.Value.sczValue, pContext->wzCondition); | ||
448 | } | ||
442 | break; | 449 | break; |
443 | 450 | ||
444 | case BURN_SYMBOL_TYPE_NUMBER: __fallthrough; | 451 | case BURN_SYMBOL_TYPE_NUMBER: __fallthrough; |
@@ -642,7 +649,7 @@ static HRESULT NextSymbol( | |||
642 | ++n; // terminating '"' | 649 | ++n; // terminating '"' |
643 | 650 | ||
644 | pContext->NextSymbol.Type = BURN_SYMBOL_TYPE_LITERAL; | 651 | pContext->NextSymbol.Type = BURN_SYMBOL_TYPE_LITERAL; |
645 | hr = BVariantSetString(&pContext->NextSymbol.Value, &pContext->wzRead[1], n - 2); | 652 | hr = BVariantSetString(&pContext->NextSymbol.Value, &pContext->wzRead[1], n - 2, FALSE); |
646 | ExitOnFailure(hr, "Failed to set symbol value."); | 653 | ExitOnFailure(hr, "Failed to set symbol value."); |
647 | break; | 654 | break; |
648 | default: | 655 | default: |
@@ -746,7 +753,7 @@ static HRESULT NextSymbol( | |||
746 | { | 753 | { |
747 | // identifier | 754 | // identifier |
748 | pContext->NextSymbol.Type = BURN_SYMBOL_TYPE_IDENTIFIER; | 755 | pContext->NextSymbol.Type = BURN_SYMBOL_TYPE_IDENTIFIER; |
749 | hr = BVariantSetString(&pContext->NextSymbol.Value, pContext->wzRead, n); | 756 | hr = BVariantSetString(&pContext->NextSymbol.Value, pContext->wzRead, n, FALSE); |
750 | ExitOnFailure(hr, "Failed to set symbol value."); | 757 | ExitOnFailure(hr, "Failed to set symbol value."); |
751 | } | 758 | } |
752 | } | 759 | } |