mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 16:44:50 +00:00
Fixes a bug that caused script filenames to be defined as properties of the global object.
This was SVN commit r15450.
This commit is contained in:
@@ -1201,7 +1201,7 @@ bool ScriptInterface::LoadScript(const VfsPath& filename, const std::string& cod
|
||||
uint lineNo = 1;
|
||||
|
||||
JS::RootedFunction func(m->m_cx,
|
||||
JS_CompileUCFunction(m->m_cx, m->m_glob, utf8_from_wstring(filename.string()).c_str(), 0, NULL,
|
||||
JS_CompileUCFunction(m->m_cx, m->m_glob, NULL, 0, NULL,
|
||||
reinterpret_cast<const jschar*> (codeUtf16.c_str()), (uint)(codeUtf16.length()),
|
||||
utf8_from_wstring(filename.string()).c_str(), lineNo)
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user