1
0
Fork 0

closure(): must freeze io.open for the comparison

This commit is contained in:
mfranz 2008-07-22 22:26:09 +00:00
parent dc4b8633a3
commit 1ad5b18ec8

View file

@ -288,9 +288,10 @@ _setlistener("/sim/signals/nasal-dir-initialized", func {
die("io.open(): opening file '" ~ path ~ "' denied (unauthorized access)\n ");
}
var _io_open = io.open;
var _closure = globals.closure;
globals.closure = func(fn, level) {
if(fn != self and fn != caller(0)[1] and fn != io.open)
if(fn != self and fn != caller(0)[1] and fn != _io_open)
return _closure(fn, level);
die("closure(): query denied (unauthorized access)");