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:
parent
88839f0b7a
commit
37559fee21
1 changed files with 1 additions and 0 deletions
|
@ -1023,6 +1023,7 @@ void FGNasalListener::valueChanged(SGPropertyNode* node)
|
||||||
if(_type < 2 && node != _node) return; // skip child events
|
if(_type < 2 && node != _node) return; // skip child events
|
||||||
if(_type > 0 || changed(_node) || _first_call)
|
if(_type > 0 || changed(_node) || _first_call)
|
||||||
call(node, naNum(0));
|
call(node, naNum(0));
|
||||||
|
if(_type == -1) abort();
|
||||||
|
|
||||||
_first_call = false;
|
_first_call = false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue