diff --git a/3rdparty/quickjs-wz b/3rdparty/quickjs-wz index 163ce747d27..0cc087c1acc 160000 --- a/3rdparty/quickjs-wz +++ b/3rdparty/quickjs-wz @@ -1 +1 @@ -Subproject commit 163ce747d271dfc3cfdc0dac92e342390c445ffd +Subproject commit 0cc087c1accdee1467abfe7ca9bbd370f5ab61b5 diff --git a/lib/wzmaplib/src/map_script.cpp b/lib/wzmaplib/src/map_script.cpp index 615e8e6aa5e..19f794012f1 100644 --- a/lib/wzmaplib/src/map_script.cpp +++ b/lib/wzmaplib/src/map_script.cpp @@ -713,7 +713,7 @@ std::shared_ptr runMapScript(const std::vector& fileBuffer, const std JS_FreeRuntime2(rt, QJSRuntimeFree_LeakHandler_Warning); pRuntimeFree_CustomLogger = nullptr; }); - JSLimitedContextOptions ctxOptions; + JSLimitedContextOptions ctxOptions = { }; ctxOptions.baseObjects = true; ctxOptions.dateObject = false; ctxOptions.eval = false; @@ -724,6 +724,7 @@ std::shared_ptr runMapScript(const std::vector& fileBuffer, const std ctxOptions.mapSet = true; ctxOptions.typedArrays = false; ctxOptions.promise = false; + ctxOptions.bigInt = false; JSContext *ctx = JS_NewLimitedContext(rt, &ctxOptions); if (ctx == nullptr) { diff --git a/src/quickjs_backend.cpp b/src/quickjs_backend.cpp index 2c22772f1ef..5633b037d64 100644 --- a/src/quickjs_backend.cpp +++ b/src/quickjs_backend.cpp @@ -152,7 +152,7 @@ class quickjs_scripting_instance : public wzapi::scripting_instance rt = JS_NewRuntime(); ASSERT(rt != nullptr, "JS_NewRuntime failed?"); - JSLimitedContextOptions ctxOptions; + JSLimitedContextOptions ctxOptions = { }; ctxOptions.baseObjects = true; ctxOptions.dateObject = true; ctxOptions.eval = (game.type == LEVEL_TYPE::CAMPAIGN); // allow "eval" only for campaign (which currently has lots of implicit eval usage) @@ -163,6 +163,7 @@ class quickjs_scripting_instance : public wzapi::scripting_instance ctxOptions.mapSet = true; ctxOptions.typedArrays = true; ctxOptions.promise = false; // disable promise, async, await + ctxOptions.bigInt = false; ctx = JS_NewLimitedContext(rt, &ctxOptions); ASSERT(ctx != nullptr, "JS_NewContext failed?");