aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Common.cs
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2020-07-17 10:42:30 -0700
committerRob Mensching <rob@firegiant.com>2020-07-17 15:27:13 -0700
commitc37f29a156a84e27e6b38a7841e2ddcde015b071 (patch)
treed9ff8d98970a103dcb31c1fc045d4c3031bf2a40 /src/WixToolset.Core/Common.cs
parent0db15d84eaabf2f1950784655ddd79413cfea44f (diff)
downloadwix-c37f29a156a84e27e6b38a7841e2ddcde015b071.tar.gz
wix-c37f29a156a84e27e6b38a7841e2ddcde015b071.tar.bz2
wix-c37f29a156a84e27e6b38a7841e2ddcde015b071.zip
Fix parsing of bind variables with default values
Diffstat (limited to 'src/WixToolset.Core/Common.cs')
-rw-r--r--src/WixToolset.Core/Common.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/WixToolset.Core/Common.cs b/src/WixToolset.Core/Common.cs
index 1a748a13..6efc7571 100644
--- a/src/WixToolset.Core/Common.cs
+++ b/src/WixToolset.Core/Common.cs
@@ -788,9 +788,9 @@ namespace WixToolset.Core
788 string scope = null; 788 string scope = null;
789 string defaultValue = null; 789 string defaultValue = null;
790 790
791 var secondDot = value.IndexOf('.', firstDot + 1, closeParen - firstDot);
792 var equalsDefaultValue = value.IndexOf('=', firstDot + 1, closeParen - firstDot); 791 var equalsDefaultValue = value.IndexOf('=', firstDot + 1, closeParen - firstDot);
793 var end = equalsDefaultValue == -1 ? closeParen : equalsDefaultValue; 792 var end = equalsDefaultValue == -1 ? closeParen : equalsDefaultValue;
793 var secondDot = value.IndexOf('.', firstDot + 1, end - firstDot);
794 794
795 if (secondDot == -1) 795 if (secondDot == -1)
796 { 796 {
@@ -814,7 +814,7 @@ namespace WixToolset.Core
814 814
815 if (equalsDefaultValue != -1 && equalsDefaultValue < closeParen) 815 if (equalsDefaultValue != -1 && equalsDefaultValue < closeParen)
816 { 816 {
817 defaultValue = value.Substring(equalsDefaultValue + 1, end - equalsDefaultValue - 1); 817 defaultValue = value.Substring(equalsDefaultValue + 1, closeParen - equalsDefaultValue - 1);
818 } 818 }
819 819
820 parsedVariable = new ParsedWixVariable 820 parsedVariable = new ParsedWixVariable