diff --git a/packet.go b/packet.go index db142cb..6d9ac36 100644 --- a/packet.go +++ b/packet.go @@ -99,7 +99,11 @@ func (p *PacketAdminServerWelcome) Read(b []byte) { p.ServerName, _ = r.ReadString(0) p.OpenTTDVersion, _ = r.ReadString(0) c, _ := r.ReadByte() - p.Dedicated = bool(c) + if c > 0 { + p.Dedicated = true + } else { + p.Dedicated = false + } p.MapName, _ = r.ReadString(0) bs := make([]byte, 13) _, _ = r.Read(bs)