From c595c9eee11fb249b5ec6d1cb7249bf2c4ab498e Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Tue, 4 Feb 2020 20:22:50 +0100 Subject: [PATCH] builtin: bring back old hex() --- vlib/builtin/int.v | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vlib/builtin/int.v b/vlib/builtin/int.v index 42486816cb..8881bb5900 100644 --- a/vlib/builtin/int.v +++ b/vlib/builtin/int.v @@ -156,16 +156,16 @@ pub fn (n i64) hex() string { len := if n >= i64(0) { n.str().len + 3 } else { 19 } hex := malloc(len) // QTODO - //count := C.sprintf(charptr(hex), '0x%'C.PRIx64, n) - count := C.sprintf(charptr(hex), '0x%x', n) + count := C.sprintf(charptr(hex), '0x%'C.PRIx64, n) + //count := C.sprintf(charptr(hex), '0x%x', n) return tos(hex, count) } pub fn (n u64) hex() string { len := if n >= u64(0) { n.str().len + 3 } else { 19 } hex := malloc(len) - //count := C.sprintf(charptr(hex), '0x%'C.PRIx64, n) - count := C.sprintf(charptr(hex), '0x%lx', n) + count := C.sprintf(charptr(hex), '0x%'C.PRIx64, n) + //count := C.sprintf(charptr(hex), '0x%lx', n) return tos(hex, count) }