parent
f9d727764f
commit
033a510cf3
|
@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
#include "cpp_api/s_security.h"
|
#include "cpp_api/s_security.h"
|
||||||
#include "areastore.h"
|
#include "areastore.h"
|
||||||
#include "porting.h"
|
#include "porting.h"
|
||||||
|
#include "debug.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "tool.h"
|
#include "tool.h"
|
||||||
#include "filesys.h"
|
#include "filesys.h"
|
||||||
|
@ -372,8 +373,8 @@ int ModApiUtil::l_request_insecure_environment(lua_State *L)
|
||||||
if (lua_getstack(L, 2, &info)) {
|
if (lua_getstack(L, 2, &info)) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
assert(lua_getstack(L, 1, &info));
|
FATAL_ERROR_IF(!lua_getstack(L, 1, &info), "lua_getstack() failed");
|
||||||
assert(lua_getinfo(L, "S", &info));
|
FATAL_ERROR_IF(!lua_getinfo(L, "S", &info), "lua_getinfo() failed");
|
||||||
// ...and that that item is the main file scope.
|
// ...and that that item is the main file scope.
|
||||||
if (strcmp(info.what, "main") != 0) {
|
if (strcmp(info.what, "main") != 0) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue