Skip to content

Commit d63e495

Browse files
committed
Allow equals sign in value for parsed KVP Pairs
Splits the parsed substring into two parts around only the boundary of the first equals sign.
1 parent 32bbe8a commit d63e495

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sources/ClangSharpPInvokeGenerator/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -852,9 +852,9 @@ private static void ParseKeyValuePairs(IEnumerable<string> keyValuePairs, List<s
852852

853853
foreach (var keyValuePair in keyValuePairs)
854854
{
855-
var parts = keyValuePair.Split('=');
855+
var parts = keyValuePair.Split('=',2);
856856

857-
if (parts.Length != 2)
857+
if (parts.Length < 2)
858858
{
859859
errorList.Add($"Error: Invalid key/value pair argument: {keyValuePair}. Expected 'name=value'");
860860
continue;

0 commit comments

Comments
 (0)