From dd2ab2e73bc9ebaaff17e7e8044804564b2171e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Thu, 29 Sep 2022 18:34:09 -0400
Subject: [PATCH] Check undefined.

Fixes #368
---
 exec/lbshell.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/exec/lbshell.js b/exec/lbshell.js
index d126eb92a0..5cdfff818a 100644
--- a/exec/lbshell.js
+++ b/exec/lbshell.js
@@ -707,6 +707,10 @@ while(bbs.online) {
 						handle_a_ctrlkey(x_prog);
 						continue;
 					}
+					if (xtrn_area.sec_list[curr_xtrnsec].prog_list[parseInt(x_prog)].number === undefined) {
+						console.beep();
+						continue;
+					}
 					stop_mouse();
 					clear_screen();
 
-- 
GitLab