Skip to content

Commit

Permalink
Fix parameter parsing for = symbol (#687)
Browse files Browse the repository at this point in the history
  • Loading branch information
Deterous authored Apr 6, 2024
1 parent 771483a commit 6ecbbb6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions CHANGELIST.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### WIP (xxxx-xx-xx)

- Fix parameter parsing for `=` symbol (Deterous)

### 3.1.5 (2024-04-05)

- Handle `.0.physical` files from Redumpers
Expand Down
6 changes: 2 additions & 4 deletions MPF.Core/Modules/BaseParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -994,11 +994,9 @@ protected bool ProcessBooleanParameter(List<string> parts, string? shortFlagStri
if (!IsFlagSupported(longFlagString))
return null;

string[] commandParts = parts[i].Split('=');
if (commandParts.Length != 2)
return null;
int loc = parts[i].IndexOf('=');

string valuePart = commandParts[1];
string valuePart = parts[i].Substring(loc + 1);

this[longFlagString] = true;
return valuePart.Trim('"');
Expand Down

0 comments on commit 6ecbbb6

Please sign in to comment.