From aeaa191fa28f88aa4adffb760fab62ffade43b2b Mon Sep 17 00:00:00 2001 From: deuce <> Date: Thu, 3 Nov 2011 21:47:02 +0000 Subject: [PATCH] Make the startup structure a global variable... it previously continued to be used after leaving the scope (which was a bug). It is surprising that this worked as much as it has. --- src/sbbs3/jsexec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sbbs3/jsexec.c b/src/sbbs3/jsexec.c index 94f7c0e168..f970af8b74 100644 --- a/src/sbbs3/jsexec.c +++ b/src/sbbs3/jsexec.c @@ -52,6 +52,7 @@ #define DEFAULT_LOG_LEVEL LOG_DEBUG /* Display all LOG levels */ #define DEFAULT_ERR_LOG_LVL LOG_WARNING +js_startup_t startup; JSRuntime* js_runtime; JSContext* js_cx; JSObject* js_glob; @@ -700,8 +701,6 @@ static BOOL js_CreateEnvObject(JSContext* cx, JSObject* glob, char** env) static BOOL js_init(char** environ) { - js_startup_t startup; - memset(&startup,0,sizeof(startup)); SAFECOPY(startup.load_path, load_path_list); -- GitLab