diff options
author | Marius Kintel <marius@kintel.net> | 2012-10-10 03:32:56 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-10-10 03:32:56 (GMT) |
commit | 65fc1d6b01ade5e76fe712f93e2e108194c3291b (patch) | |
tree | 01db642d8dd2cd0cae80fedcc1510bfa4fcfbff1 /src/context.h | |
parent | 165c29e159ba660019fc4c5184819ca49adf8bda (diff) |
Detect recursive execution of functions to avoid a stack overflow crash. Fixes #200
Diffstat (limited to 'src/context.h')
-rw-r--r-- | src/context.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/context.h b/src/context.h index f085e01..de5f1ca 100644 --- a/src/context.h +++ b/src/context.h @@ -41,6 +41,8 @@ public: static std::vector<const Context*> ctx_stack; + mutable unordered_map<std::string, int> recursioncount; + private: typedef unordered_map<std::string, Value> ValueMap; ValueMap constants; |