mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-12 20:20:16 +08:00
bug fix: null bulk reply bytes
This commit is contained in:
@@ -28,7 +28,7 @@ func MakeBulkReply(arg []byte) *BulkReply {
|
||||
|
||||
// ToBytes marshal redis.Reply
|
||||
func (r *BulkReply) ToBytes() []byte {
|
||||
if len(r.Arg) == 0 {
|
||||
if r.Arg == nil {
|
||||
return nullBulkBytes
|
||||
}
|
||||
return []byte("$" + strconv.Itoa(len(r.Arg)) + CRLF + string(r.Arg) + CRLF)
|
||||
|
Reference in New Issue
Block a user