diff --git a/std/encoding/json/buffer.jule b/std/encoding/json/buffer.jule index 70f87f31f..5a390359a 100644 --- a/std/encoding/json/buffer.jule +++ b/std/encoding/json/buffer.jule @@ -98,7 +98,7 @@ fn growSlice(b: []byte, n: int): []byte { if c < cap(b)<<1 { c = cap(b) << 1 } - mut b2 := append([]byte(nil), make([]byte, c)...) + mut b2 := make([]byte, len(b), c) copy(b2, b) - ret b2[:len(b)] + ret b2 } \ No newline at end of file