aboutsummaryrefslogtreecommitdiffstats
path: root/src/bootstrap/main.c
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-10-17 14:30:33 +0200
committerBad Diode <bd@badd10de.dev>2021-10-17 14:30:33 +0200
commit953a44b3fd61302e6b86d549109a718a001c9b3c (patch)
treeb73d2d68b268bd3eb902e025d4a36a2095f3e3fd /src/bootstrap/main.c
parentdbeab0d63b21c14e9c462c08c8f776e9428b853c (diff)
downloadbdl-953a44b3fd61302e6b86d549109a718a001c9b3c.tar.gz
bdl-953a44b3fd61302e6b86d549109a718a001c9b3c.zip
Fix heap corruption bug due to bad initialization
Diffstat (limited to 'src/bootstrap/main.c')
-rwxr-xr-xsrc/bootstrap/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/main.c b/src/bootstrap/main.c
index 7251e60..bf2354b 100755
--- a/src/bootstrap/main.c
+++ b/src/bootstrap/main.c
@@ -115,10 +115,10 @@ process_source(const StringView *source) {
115 size_t root_stack_size = gc.roots.size; 115 size_t root_stack_size = gc.roots.size;
116 Object *root = parse_tree(&visitor); 116 Object *root = parse_tree(&visitor);
117 gc.roots.size = root_stack_size; 117 gc.roots.size = root_stack_size;
118 push_root(root);
119 if (root == obj_err || errors_n != 0) { 118 if (root == obj_err || errors_n != 0) {
120 break; 119 break;
121 } 120 }
121 push_root(root);
122 122
123 Object *result = eval(global_env, root); 123 Object *result = eval(global_env, root);
124 if (result != obj_nil) { 124 if (result != obj_nil) {