Skip to content

Commit

Permalink
fix no value parameters being ignored
Browse files Browse the repository at this point in the history
  • Loading branch information
bluepilledgreat committed Jun 15, 2024
1 parent 6ad9bfc commit 575422e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Bloxstrap/ProtocolHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@ static class ProtocolHandler

public static string ParseUri(string protocol)
{
var args = new Dictionary<string, string>();
var args = new Dictionary<string, string?>();
bool channelArgPresent = false;

foreach (var parameter in protocol.Split('+'))
{
if (!parameter.Contains(':'))
{
args[parameter] = null;
continue;
}

var kv = parameter.Split(':');
string key = kv[0];
Expand All @@ -42,7 +45,7 @@ public static string ParseUri(string protocol)
if (!channelArgPresent)
EnrollChannel(RobloxDeployment.DefaultChannel);

var pairs = args.Select(x => x.Key + ":" + x.Value).ToArray();
var pairs = args.Select(x => x.Value != null ? x.Key + ":" + x.Value : x.Key).ToArray();
return String.Join("+", pairs);
}

Expand Down

0 comments on commit 575422e

Please sign in to comment.