mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
builtin: fix a bug in []string.join()
This commit is contained in:
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
Block a user