From f43a5bd6e48b7841f3157bab899a7ec3e7ff3881 Mon Sep 17 00:00:00 2001 From: Andy Arthur Date: Mon, 21 Feb 2022 09:38:42 -0800 Subject: [PATCH] fix codec test --- go/store/val/codec_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go/store/val/codec_test.go b/go/store/val/codec_test.go index 6f8ef6201c..dea1925738 100644 --- a/go/store/val/codec_test.go +++ b/go/store/val/codec_test.go @@ -133,7 +133,9 @@ func encFloat(f float64) []byte { } func encStr(s string) []byte { - return []byte(s) + buf := make([]byte, len(s)+1) + writeString(buf, s) + return buf } func TestCodecRoundTrip(t *testing.T) {