mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
cgen: fix type_to_fmt()
for i64
and u32
(#8954)
This commit is contained in:
parent
57d1b5b74d
commit
12a4e7ad90
@ -48,7 +48,11 @@ fn (g &Gen) type_to_fmt(typ table.Type) string {
|
|||||||
return "'%.*s\\000'"
|
return "'%.*s\\000'"
|
||||||
} else if sym.kind in [.f32, .f64] {
|
} else if sym.kind in [.f32, .f64] {
|
||||||
return '%g\\000' // g removes trailing zeros unlike %f
|
return '%g\\000' // g removes trailing zeros unlike %f
|
||||||
|
} else if sym.kind == .u32 {
|
||||||
|
return '%u\\000'
|
||||||
} else if sym.kind == .u64 {
|
} else if sym.kind == .u64 {
|
||||||
|
return '%llu\\000'
|
||||||
|
} else if sym.kind == .i64 {
|
||||||
return '%lld\\000'
|
return '%lld\\000'
|
||||||
}
|
}
|
||||||
return '%d\\000'
|
return '%d\\000'
|
||||||
|
Loading…
Reference in New Issue
Block a user