From 2c1f117d35308f0f40bf78efbd29b45bf0cbc4d4 Mon Sep 17 00:00:00 2001 From: Nulliphite <47942799+Nulliphite@users.noreply.github.com> Date: Thu, 28 Feb 2019 03:05:49 +1000 Subject: [PATCH] Fixed indexoutofbounds error when calling @gm without anymore parameters (#415) --- src/client/command/commands/gm0/GmCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/command/commands/gm0/GmCommand.java b/src/client/command/commands/gm0/GmCommand.java index 906210a636..c625022789 100644 --- a/src/client/command/commands/gm0/GmCommand.java +++ b/src/client/command/commands/gm0/GmCommand.java @@ -46,7 +46,7 @@ public class GmCommand extends Command { "Do not say 'I have a bug to report', just state it.", }; MapleCharacter player = c.getPlayer(); - if (params[0].length() < 3) { // #goodbye 'hi' + if (params.length < 1 || params[0].length() < 3) { // #goodbye 'hi' player.dropMessage(5, "Your message was too short. Please provide as much detail as possible."); return; }