builtin: fix a bug in `[]string.join()`
parent
8abfe2f5a2
commit
419ee8ae2a
|
@ -1576,7 +1576,7 @@ pub fn (a []string) join(del string) string {
|
|||
}
|
||||
len -= del.len
|
||||
// Allocate enough memory
|
||||
mut res := ''
|
||||
mut res := string{}
|
||||
res.len = len
|
||||
res.str = unsafe { malloc(res.len + 1) }
|
||||
mut idx := 0
|
||||
|
|
Loading…
Reference in New Issue