diff options
author | Yuri Sizov <11782833+YuriSizov@users.noreply.github.com> | 2023-02-17 17:00:46 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-17 17:00:46 +0300 |
commit | 6212da66e859fff7f3522e67045eeb81fcad0296 (patch) | |
tree | 52e941a61d1ad406f7aaf250b0f39dd7c80cd9fe /modules/gdscript/gdscript_function.h | |
parent | 6e0dd6beca4ac9f62ecf27f33c99d456d5871f7f (diff) | |
parent | 34f0a2ca46bda37c49caf0a4e2feb25e1ce9ad4f (diff) |
Merge pull request #72867 from vnen/gdscript-limit-call-depth
GDScript: Add limit to call depth
Diffstat (limited to 'modules/gdscript/gdscript_function.h')
-rw-r--r-- | modules/gdscript/gdscript_function.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h index f45c1f9577..2624fb8dd9 100644 --- a/modules/gdscript/gdscript_function.h +++ b/modules/gdscript/gdscript_function.h @@ -544,6 +544,8 @@ private: #endif public: + static constexpr int MAX_CALL_DEPTH = 2048; // Limit to try to avoid crash because of a stack overflow. + struct CallState { GDScript *script = nullptr; GDScriptInstance *instance = nullptr; |