1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: fix u64 in struct str()

This commit is contained in:
Alexander Medvednikov 2020-08-18 16:05:11 +02:00
parent 7727aad90f
commit 51bd69cdd8

View File

@ -4695,6 +4695,8 @@ fn (g &Gen) type_to_fmt(typ table.Type) string {
return '%.*s\\000'
} else if typ in [table.f32_type, table.f64_type] {
return '%g\\000' // g removes trailing zeros unlike %f
} else if typ == table.u64_type {
return '%lld\\000'
}
return '%d\\000'
}