mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: minor array_init fix
This commit is contained in:
parent
ff1437fc5a
commit
47ffedc5de
@ -4345,12 +4345,10 @@ fn (mut g Gen) array_init(it ast.ArrayInit) {
|
||||
g.write('sizeof($elem_type_str), ')
|
||||
if is_default_array {
|
||||
g.write('_val_$it.pos.pos)')
|
||||
} else if it.has_default || (it.has_len && it.elem_type == table.string_type) {
|
||||
g.write('&_val_$it.pos.pos)')
|
||||
} else {
|
||||
if it.has_default || (it.has_len && it.elem_type == table.string_type) {
|
||||
g.write('&_val_$it.pos.pos)')
|
||||
} else {
|
||||
g.write('0)')
|
||||
}
|
||||
g.write('0)')
|
||||
}
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user