From 0683bd8bf66c00d38f79d49319b5d80ac1f9a470 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 10 Apr 2016 12:04:25 -0700 Subject: fix crash when casting undefined to slice also fix crash having to do with runtime allocated stack memory --- src/analyze.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/analyze.cpp') diff --git a/src/analyze.cpp b/src/analyze.cpp index fb6894eba0..321915d6ea 100644 --- a/src/analyze.cpp +++ b/src/analyze.cpp @@ -3838,6 +3838,7 @@ static void eval_const_expr_implicit_cast(CodeGen *g, AstNode *node, AstNode *ex return; } const_val->depends_on_compile_var = other_val->depends_on_compile_var; + const_val->undef = other_val->undef; assert(other_val != const_val); switch (node->data.fn_call_expr.cast_op) { -- cgit v1.2.3