From 769c9a9af7f759f89593c5136a1359ce35366fbc Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Mon, 14 Dec 2020 22:25:12 +0100
Subject: [PATCH] In web client index selection, disallow non-number replies.

---
 rogue_chat.html | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rogue_chat.html b/rogue_chat.html
index dd8de5b..d810c2e 100644
--- a/rogue_chat.html
+++ b/rogue_chat.html
@@ -1045,7 +1045,7 @@ let tui = {
   },
   pick_selectable: function(task_name) {
       const i = parseInt(this.inputEl.value);
-      if (isNaN(i) || i < 0 || i >= this.selectables.length) {
+      if (isNaN(this.inputEl.value) || i < 0 || i >= this.selectables.length) {
           tui.log_msg('? invalid index, aborted');
       } else {
           server.send(['TASK:' + task_name, tui.selectables[i]]);
-- 
2.30.2