From 51bd69cdd8785a6c8a293aa13a07bfea24ad6b97 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Tue, 18 Aug 2020 16:05:11 +0200 Subject: [PATCH] cgen: fix u64 in struct str() --- vlib/v/gen/cgen.v | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlib/v/gen/cgen.v b/vlib/v/gen/cgen.v index 778f966aed..f3b59fe7ae 100644 --- a/vlib/v/gen/cgen.v +++ b/vlib/v/gen/cgen.v @@ -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' }