mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: fix C++ compilation
This commit is contained in:
@ -1640,8 +1640,8 @@ pub fn (a []string) join(del string) string {
|
|||||||
len -= del.len
|
len -= del.len
|
||||||
// Allocate enough memory
|
// Allocate enough memory
|
||||||
mut res := string{
|
mut res := string{
|
||||||
len: len
|
|
||||||
str: unsafe { malloc(len + 1) }
|
str: unsafe { malloc(len + 1) }
|
||||||
|
len: len
|
||||||
}
|
}
|
||||||
mut idx := 0
|
mut idx := 0
|
||||||
// Go thru every string and copy its every char one by one
|
// Go thru every string and copy its every char one by one
|
||||||
|
Reference in New Issue
Block a user