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

Merge branch 'prextrnevalfix' into 'master'

fix pre/post_eval_on_exec to work with existing uses

See merge request sbbs/sbbs!33
parents cadd54ec caf364ba
Branches
Tags
No related merge requests found
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
"use strict"; "use strict";
function exec_xtrn_post(program) function exec_xtrn_post(prog)
{ {
var options; var options;
if ((options = load({}, "modopts.js","xtrn:" + program.code)) == null) { if ((options = load({}, "modopts.js","xtrn:" + prog.code)) == null) {
if ((options = load({}, "modopts.js","xtrn_sec")) == null) if ((options = load({}, "modopts.js","xtrn_sec")) == null)
options = {}; // default values options = {}; // default values
} }
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
"use strict"; "use strict";
function exec_xtrn_pre(program) function exec_xtrn_pre(prog)
{ {
var options; var options;
if ((options = load({}, "modopts.js","xtrn:" + program.code)) == null) { if ((options = load({}, "modopts.js","xtrn:" + prog.code)) == null) {
if ((options = load({}, "modopts.js","xtrn_sec")) == null) if ((options = load({}, "modopts.js","xtrn_sec")) == null)
options = {}; // default values options = {}; // default values
} }
...@@ -31,8 +31,8 @@ function exec_xtrn_pre(program) ...@@ -31,8 +31,8 @@ function exec_xtrn_pre(program)
} }
} }
if (bbs.menu_exists("xtrn/" + program.code)) { if (bbs.menu_exists("xtrn/" + prog.code)) {
bbs.menu("xtrn/" + program.code); bbs.menu("xtrn/" + prog.code);
console.pause(); console.pause();
console.line_counter=0; console.line_counter=0;
} }
...@@ -48,7 +48,7 @@ function exec_xtrn_pre(program) ...@@ -48,7 +48,7 @@ function exec_xtrn_pre(program)
eval(options.eval_before_exec); eval(options.eval_before_exec);
} }
load('fonts.js', 'xtrn:' + program.code); load('fonts.js', 'xtrn:' + prog.code);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment