From 0a0d6536c2aad392c535834ed845c2c2b172c893 Mon Sep 17 00:00:00 2001 From: Henrixounez Date: Sat, 24 Aug 2019 23:21:13 +0200 Subject: [PATCH] compiler: access index when casting array into an array[] for pointer --- compiler/fn.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/fn.v b/compiler/fn.v index bf70c27757..ccbbd93cb7 100644 --- a/compiler/fn.v +++ b/compiler/fn.v @@ -898,7 +898,7 @@ fn (p mut Parser) fn_call_args(f mut Fn) *Fn { // have to use `(array[]){ expr }` hack. if expected.starts_with('array_') && expected.ends_with('*') { p.cgen.set_placeholder(ph, '& /*111*/ (array[]){') - p.gen('} ') + p.gen('}[0] ') } // println('\ne:"$expected" got:"$got"') else if ! (expected == 'void*' && got == 'int') &&