Skip to content
Permalink
Browse files

decrease the execution depth when a script finishes

we’re worried about stack overflow, not how many scripts you can run
  • Loading branch information
samdoshi committed May 17, 2017
1 parent 6636f21 commit 86708489ca7df2288ffa7c1de26598b20e78589d
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/teletype.c
@@ -152,6 +152,10 @@ process_result_t run_script_with_exec_state(scene_state_t *ss, exec_state_t *es,
result =
process_command(ss, es, ss_get_script_command(ss, script_no, i));
}

// decrease the depth once the commands have been run
es->exec_depth--;

return result;
}

0 comments on commit 8670848

Please sign in to comment.