From cb7984461a700c080c8ec0fc20bfd331c307c530 Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 16 May 2023 00:24:03 +0300 Subject: [PATCH] Fix index out of range exception on the admin commands (#16478) --- Content.Server/Administration/Commands/AddBodyPartCommand.cs | 2 +- Content.Server/Administration/Commands/RoleUnbanCommand.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.51.2