From 66d3917554c2b3af0f444e2e0e55b085d173c4aa Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 7 Apr 2021 15:25:45 +0300 Subject: [PATCH] builtin: fix C++ compilation --- vlib/builtin/string.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/builtin/string.v b/vlib/builtin/string.v index bba178d376..2142fadb0c 100644 --- a/vlib/builtin/string.v +++ b/vlib/builtin/string.v @@ -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