From 507f4ce87a0e89bee4d3768ee292462e5a1763a5 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Thu, 2 Apr 2020 01:47:32 +0200 Subject: [PATCH] array: handle "0" strings --- vlib/builtin/array.v | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/vlib/builtin/array.v b/vlib/builtin/array.v index 731d664ab8..366c398746 100644 --- a/vlib/builtin/array.v +++ b/vlib/builtin/array.v @@ -381,7 +381,9 @@ pub fn (a []int) str() string { val := a[i].str() sb.write(val) //println('"$val"') - val.free() + if a[i] != 0 { + val.free() + } if i < a.len - 1 { sb.write(', ') }