From: mfranz Date: Sat, 17 Mar 2007 20:51:06 +0000 (+0000) Subject: set module namespace in globals, otherwise two subsequent calls can't share X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=8c7c21703758b00f7e543ac4a38bfbbefe879237;p=flightgear.git set module namespace in globals, otherwise two subsequent calls can't share variables, which makes the whole module kind-of pointless --- diff --git a/src/Scripting/NasalSys.cxx b/src/Scripting/NasalSys.cxx index bcc797e12..9494575f7 100644 --- a/src/Scripting/NasalSys.cxx +++ b/src/Scripting/NasalSys.cxx @@ -612,6 +612,7 @@ bool FGNasalSys::handleCommand(const SGPropertyNode* arg) naStr_fromdata(modname, (char*)moduleName, strlen(moduleName)); if(!naHash_get(_globals, modname, &locals)) locals = naNewHash(c); + hashset(_globals, moduleName, locals); } // Cache the command argument for inspection via cmdarg(). For // performance reasons, we won't bother with it if the invoked