]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix index out of range exception on the admin commands (#16478)
authorMax <SijyKijy@users.noreply.github.com>
Mon, 15 May 2023 21:24:03 +0000 (00:24 +0300)
committerGitHub <noreply@github.com>
Mon, 15 May 2023 21:24:03 +0000 (14:24 -0700)
Content.Server/Administration/Commands/AddBodyPartCommand.cs
Content.Server/Administration/Commands/RoleUnbanCommand.cs

index 0dbe1e2606eba3a3641880704bfae15dfed53515..53af89bf9d2d106eaac36a80bf79fa8999c52152 100644 (file)
@@ -34,7 +34,7 @@ namespace Content.Server.Administration.Commands
             var entityManager = IoCManager.Resolve<IEntityManager>();
             var bodySystem = entityManager.System<BodySystem>();
 
-            if (bodySystem.TryCreatePartSlotAndAttach(parentId, args[3], childId))
+            if (bodySystem.TryCreatePartSlotAndAttach(parentId, args[2], childId))
             {
                 shell.WriteLine($@"Added {childId} to {parentId}.");
             }
index 1d7458c0f036da8825c381551aff48b7f93aaa7e..ba8ab61c5c114338429979801f32e64f8f0542d7 100644 (file)
@@ -1,4 +1,4 @@
-using System.Text;
+using System.Text;
 using Content.Server.Database;
 using Content.Shared.Administration;
 using Robust.Server.Player;
@@ -26,7 +26,7 @@ public sealed class RoleUnbanCommand : IConsoleCommand
 
         if (!int.TryParse(args[0], out var banId))
         {
-            shell.WriteLine($"Unable to parse {args[1]} as a ban id integer.\n{Help}");
+            shell.WriteLine($"Unable to parse {args[0]} as a ban id integer.\n{Help}");
             return;
         }