From 6ecbbb697828c41c13c9ac768e462d7be0e07629 Mon Sep 17 00:00:00 2001 From: Deterous <138427222+Deterous@users.noreply.github.com> Date: Sat, 6 Apr 2024 10:27:57 +0900 Subject: [PATCH] Fix parameter parsing for `=` symbol (#687) --- CHANGELIST.md | 4 ++++ MPF.Core/Modules/BaseParameters.cs | 6 ++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 288654e9b..ecf4c2227 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -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 diff --git a/MPF.Core/Modules/BaseParameters.cs b/MPF.Core/Modules/BaseParameters.cs index 2bcf65917..ea38e8a81 100644 --- a/MPF.Core/Modules/BaseParameters.cs +++ b/MPF.Core/Modules/BaseParameters.cs @@ -994,11 +994,9 @@ protected bool ProcessBooleanParameter(List 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('"');