Skip to content
Snippets Groups Projects
Commit 2ce9ccfe authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Reset sbbs_t menu path vars (menu_dir and menu_file) before execing cmd shell

I obvserved an issue with Amessyroom's bbs where his custom (JS) shell is
setting bbs.menu_dir but when switching to another stock shell, his menu
files were still being displayed (with mismatching command keys as a result).

bbs.menu_dir (and implicitly, the set_menu_dir Baja function) apparently have
not been used in this way (much) before.
parent eab705ef
No related branches found
No related tags found
No related merge requests found
Pipeline #6817 passed
......@@ -4253,8 +4253,6 @@ void sbbs_t::reset_logon_vars(void)
cid[0]=0;
wordwrap[0]=0;
question[0]=0;
menu_dir[0]=0;
menu_file[0]=0;
row = 0;
rows = startup->default_term_height;
cols = startup->default_term_width;
......@@ -4456,6 +4454,8 @@ void node_thread(void* arg)
if(curshell != sbbs->useron.shell) {
if(sbbs->useron.shell>=sbbs->cfg.total_shells)
sbbs->useron.shell=0;
sbbs->menu_dir[0]=0;
sbbs->menu_file[0]=0;
if(sbbs->cfg.mods_dir[0]) {
SAFEPRINTF2(str,"%s%s.js",sbbs->cfg.mods_dir
......@@ -4517,8 +4517,6 @@ void node_thread(void* arg)
curshell=sbbs->useron.shell;
sbbs->main_csi.ip=sbbs->main_csi.cs;
sbbs->menu_dir[0]=0;
sbbs->menu_file[0]=0;
}
if(sbbs->exec(&sbbs->main_csi))
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment