diff options
| author | Ginger Bill <bill@gingerbill.org> | 2017-04-02 18:28:45 +0100 |
|---|---|---|
| committer | Ginger Bill <bill@gingerbill.org> | 2017-04-02 18:28:45 +0100 |
| commit | 01da0d1377cee93d51d5fa7175ba1b8b626c243f (patch) | |
| tree | ea8761802176bf7440509b085ed15a2748ff22c5 /src | |
| parent | 8ce58573dfa2c140dcafd633e51c56d555f7ebc1 (diff) | |
Fix make for dynamic arrays
Diffstat (limited to 'src')
| -rw-r--r-- | src/ir.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3748,10 +3748,10 @@ irValue *ir_build_expr(irProcedure *proc, AstNode *expr) { } else if (is_type_dynamic_array(type)) { Type *elem_type = base_type(type)->DynamicArray.elem; irValue *len = v_zero; - irValue *cap = ir_const_int(a, 8); if (ce->args.count > 1) { len = ir_emit_conv(proc, ir_build_expr(proc, ce->args.e[1]), t_int); } + irValue *cap = len; if (ce->args.count > 2) { cap = ir_emit_conv(proc, ir_build_expr(proc, ce->args.e[2]), t_int); } |