1
0
Fork 0

make fgfs abort() after a listener with runtime arg == -1 was triggered

and its function called. This is useful for debugging purposes, to get
a core dump which unveils which C++ code was writing to the property.
This isn't any more of a security problem as other Nasal code that
makes fgfs crash, such as:  var x = func call(x); x();  The difference
is that the listener doesn't use up all memory before and is much quicker.
This commit is contained in:
mfranz 2008-06-19 10:39:12 +00:00
parent 88839f0b7a
commit 37559fee21

View file

@ -1023,6 +1023,7 @@ void FGNasalListener::valueChanged(SGPropertyNode* node)
if(_type < 2 && node != _node) return; // skip child events
if(_type > 0 || changed(_node) || _first_call)
call(node, naNum(0));
if(_type == -1) abort();
_first_call = false;
}