authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-03-10 02:50:53-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2017-03-10 02:50:53-05:00
logc91dbdb27c2c6b6ab4f26345382128e86c5456f3
tree568736f47025c33704defc325cfc55528e1e7910
parentcd31f875a68fba0519f20c561b11b5dfb9524a8b

fix not allocating enough memory for passing args

fixes a bug introduced in c62db5721c1bf

1 files changed, 1 insertions(+), 1 deletions(-)

src/ir.cpp+1-1
...@@ -8199,7 +8199,7 @@ static TypeTableEntry *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCall *cal...@@ -8199,7 +8199,7 @@ static TypeTableEntry *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCall *cal
8199 assert(fn_entry);8199 assert(fn_entry);
82008200
8201 // Count the arguments of the function type id we are creating8201 // Count the arguments of the function type id we are creating
8202 size_t new_fn_arg_count = 0;8202 size_t new_fn_arg_count = first_arg_1_or_0;
8203 for (size_t call_i = 0; call_i < call_instruction->arg_count; call_i += 1) {8203 for (size_t call_i = 0; call_i < call_instruction->arg_count; call_i += 1) {
8204 IrInstruction *arg = call_instruction->args[call_i]->other;8204 IrInstruction *arg = call_instruction->args[call_i]->other;
8205 if (type_is_invalid(arg->value.type))8205 if (type_is_invalid(arg->value.type))