16 Sep 2023, 19:59
The premise of <= is that there should never be a UDF entry at the bottom of the stack, because there should always be a thread entry. There might not be one when a Fast-mode C callback is called, but that is only in the case of misuse. There probably isn't any benefit in using <= over <, though, so I'll change it.
In this and several related cases, there is no thread entry to indicate that the function is being called by an event. If another function was running, it would look like that other function called this function. That should be fixed (with DEBUGGER_STACK_PUSH/POP), which would also fix the local variables.