diff options
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r-- | src/console_cmds.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index f66cfa6b6..f50644cf5 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -960,6 +960,11 @@ DEF_CONSOLE_CMD(ConExec) return true; } + if (_script_current_depth == 11) { + IConsoleError("Maximum 'exec' depth reached; script A is calling script B is calling script C ... more than 10 times."); + return true; + } + _script_current_depth++; uint script_depth = _script_current_depth; |