From 5b2442591f9a53f6b5481f5a8f731591c0f6c660 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AD=B1=E5=82=91?= Date: Sun, 12 Nov 2023 13:54:49 +0800 Subject: [PATCH] Fix include UID space issue --- Source/GrasscutterTools/Forms/FormMain.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Source/GrasscutterTools/Forms/FormMain.cs b/Source/GrasscutterTools/Forms/FormMain.cs index d5ac3e94..fe0458a5 100644 --- a/Source/GrasscutterTools/Forms/FormMain.cs +++ b/Source/GrasscutterTools/Forms/FormMain.cs @@ -517,10 +517,11 @@ private void AddCommandToList(string command = "") private void SetCommand(string command, string args) { if (!string.IsNullOrEmpty(args)) - command = command + ' ' + args; - SetCommand(Settings.Default.IsIncludeUID - ? $"{command} @{Settings.Default.Uid}" - : command); + command = $"{command} {args}"; + command = command.Trim(); + if (Settings.Default.IsIncludeUID) + command = $"{command} @{Settings.Default.Uid}"; + SetCommand(command); } ///