pioneerspacesim/pioneer — pull request #1869 by johnbartholomew (2012-12-23 16:40:09+00:00)
Title: Fix secure_trampoline to ignore C functions on the stack

#1706 broke the new-ui FileDialog (used for Load Game from the main menu), which we unfortunately didn't notice until it was merged. This should fix it.

`secure_trampoline` now skips any C functions on the stack, and makes its decision based on the first Lua function it finds. This is enough to fix the problem, though we may have to revisit the question of trusted code later on.