From 36baf97334f2c797227bf4ce9f78f46a2112a4e3 Mon Sep 17 00:00:00 2001 From: Rob Swindell <rob@synchro.net> Date: Wed, 23 Dec 2020 13:53:20 -0800 Subject: [PATCH] Fix line 260: TypeError: imsg_user[last_user] is undefined Not sure how Zharvek triggers this error using the module, but he managed to do it twice, so add a bit of paranoia-check. --- exec/sbbsimsg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exec/sbbsimsg.js b/exec/sbbsimsg.js index a4028f09ad..46469f28af 100644 --- a/exec/sbbsimsg.js +++ b/exec/sbbsimsg.js @@ -255,7 +255,7 @@ while(bbs.online) { break; } done=false; - while(bbs.online && !done && !console.aborted) { + while(bbs.online && !done && !console.aborted && imsg_user[last_user]) { printf("\1[\1n\1h\x11\1n-[\1hQ\1nuit/\1hA\1nll]-\1h\x10 \1y%-25s \1c%s\1>" ,imsg_user[last_user].name,imsg_user[last_user].bbs); switch(console.getkey(K_UPPER|K_NOECHO)) { -- GitLab