Fix setting selection/active line from automation scripts

The error handling function is under the results of the called function,
not at the top of the stack, so lua_pop was removing the wrong thing.
This commit is contained in:
Thomas Goyne 2013-09-23 14:15:45 -07:00
parent 8c7ec3a3b6
commit 7651e83314

View file

@ -720,7 +720,7 @@ namespace Automation4 {
lua_pop(L, 1);
failed = true;
}
lua_pop(L, 1);
lua_remove(L, -nresults - 1);
lua_gc(L, LUA_GCCOLLECT, 0);
});
@ -890,7 +890,7 @@ namespace Automation4 {
subsobj->ProcessingComplete(StrDisplay(c));
AssDialogue *active_line = 0;
AssDialogue *active_line = nullptr;
int active_idx = 0;
// Check for a new active row