summaryrefslogtreecommitdiff
path: root/src/context.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2012-10-10 03:32:56 (GMT)
committerMarius Kintel <marius@kintel.net>2012-10-10 03:32:56 (GMT)
commit65fc1d6b01ade5e76fe712f93e2e108194c3291b (patch)
tree01db642d8dd2cd0cae80fedcc1510bfa4fcfbff1 /src/context.h
parent165c29e159ba660019fc4c5184819ca49adf8bda (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.h2
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;
contact: Jan Huwald // Impressum