From 088d872f9375a943f185bf65d80f549a87b1c35a Mon Sep 17 00:00:00 2001 From: atomicint Date: Sat, 23 Jan 2016 15:52:43 -0500 Subject: [PATCH] Fixes issue #74 --- .../message/handler/NpcActionVerificationHandler.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/game/src/main/org/apollo/game/message/handler/NpcActionVerificationHandler.java b/game/src/main/org/apollo/game/message/handler/NpcActionVerificationHandler.java index 0528aa01..32f5cefc 100644 --- a/game/src/main/org/apollo/game/message/handler/NpcActionVerificationHandler.java +++ b/game/src/main/org/apollo/game/message/handler/NpcActionVerificationHandler.java @@ -43,7 +43,15 @@ public final class NpcActionVerificationHandler extends MessageHandler= definition.getInteractions().length) { + String[] actions = definition.getInteractions(); + int option = message.getOption(); + + if (option < 0 || option >= actions.length) { + message.terminate(); + return; + } + + if ("null".equals(actions[option])) { message.terminate(); return; }