diff --git a/decode_string.go b/decode_string.go index 66412c9..3847265 100644 --- a/decode_string.go +++ b/decode_string.go @@ -35,7 +35,7 @@ func (d *stringDecoder) decodeStream(s *stream, p unsafe.Pointer) error { if err != nil { return err } - *(*string)(p) = string(bytes) + *(*string)(p) = *(*string)(unsafe.Pointer(&bytes)) s.reset() return nil }