From: Max Date: Mon, 15 May 2023 21:24:03 +0000 (+0300) Subject: Fix index out of range exception on the admin commands (#16478) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=cb7984461a700c080c8ec0fc20bfd331c307c530;p=space-station-14.git Fix index out of range exception on the admin commands (#16478) --- diff --git a/Content.Server/Administration/Commands/AddBodyPartCommand.cs b/Content.Server/Administration/Commands/AddBodyPartCommand.cs index 0dbe1e2606..53af89bf9d 100644 --- a/Content.Server/Administration/Commands/AddBodyPartCommand.cs +++ b/Content.Server/Administration/Commands/AddBodyPartCommand.cs @@ -34,7 +34,7 @@ namespace Content.Server.Administration.Commands var entityManager = IoCManager.Resolve(); var bodySystem = entityManager.System(); - if (bodySystem.TryCreatePartSlotAndAttach(parentId, args[3], childId)) + if (bodySystem.TryCreatePartSlotAndAttach(parentId, args[2], childId)) { shell.WriteLine($@"Added {childId} to {parentId}."); } diff --git a/Content.Server/Administration/Commands/RoleUnbanCommand.cs b/Content.Server/Administration/Commands/RoleUnbanCommand.cs index 1d7458c0f0..ba8ab61c5c 100644 --- a/Content.Server/Administration/Commands/RoleUnbanCommand.cs +++ b/Content.Server/Administration/Commands/RoleUnbanCommand.cs @@ -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; }