From 1cb3c60b4727f1d5e730aed64fe794907842bcc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sat, 3 Sep 2022 09:24:13 +0800 Subject: [PATCH] Fix write zero --- common/buf/buffer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/buf/buffer.go b/common/buf/buffer.go index bfc07e0..8f2ce1a 100644 --- a/common/buf/buffer.go +++ b/common/buf/buffer.go @@ -237,8 +237,8 @@ func (b *Buffer) WriteZero() error { if b.IsFull() { return io.ErrShortBuffer } - b.end++ b.data[b.end] = 0 + b.end++ return nil }