From 0cd8b4fd3be77922c373bc95aeccfe15fdab3821 Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Sat, 30 Apr 2016 11:59:10 +1000 Subject: [PATCH] Allow encoding private=0 in metainfo, which fixes test for not using InfoEx.Bytes when marshalling as a shortcut --- metainfo/metainfo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metainfo/metainfo.go b/metainfo/metainfo.go index d02bf3ca..1dda2702 100644 --- a/metainfo/metainfo.go +++ b/metainfo/metainfo.go @@ -50,7 +50,7 @@ type Info struct { Pieces []byte `bencode:"pieces"` Name string `bencode:"name"` Length int64 `bencode:"length,omitempty"` - Private bool `bencode:"private,omitempty"` + Private *bool `bencode:"private,omitempty"` Files []FileInfo `bencode:"files,omitempty"` }