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

builtin: use 0 instead of \0 rune when setting C style terminators; use C.memcpy in []string{}.join("")

This commit is contained in:
Delyan Angelov
2021-04-13 11:29:33 +03:00
parent 1b924fcf41
commit a1121d0eb0
4 changed files with 25 additions and 30 deletions

View File

@ -533,7 +533,7 @@ pub fn (b []byte) hex() string {
}
}
unsafe {
hex[dst_i] = `\0`
hex[dst_i] = 0
return tos(hex, dst_i)
}
}