builtin: fix C++ compilation

pull/9628/head
Alexander Medvednikov 2021-04-07 15:25:45 +03:00
parent 4e6a176f42
commit 66d3917554
1 changed files with 1 additions and 1 deletions

View File

@ -1640,8 +1640,8 @@ pub fn (a []string) join(del string) string {
len -= del.len
// Allocate enough memory
mut res := string{
len: len
str: unsafe { malloc(len + 1) }
len: len
}
mut idx := 0
// Go thru every string and copy its every char one by one