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

v2: parse builtin successfully

This commit is contained in:
Alexander Medvednikov
2020-02-07 07:34:18 +01:00
parent 2ce6b190dd
commit bb60b3081f
6 changed files with 92 additions and 44 deletions

View File

@ -367,7 +367,7 @@ pub fn (b []byte) hex() string {
mut hex := malloc(b.len * 2 + 1)
mut ptr := &hex[0]
for i := 0; i < b.len; i++ {
ptr += C.sprintf(charptr(ptr), '%02x', b[i])
ptr += C.sprintf(ptr as charptr, '%02x', b[i])
}
return string(hex)
}