fix parsing

This commit is contained in:
shoopea
2021-11-07 20:27:27 +08:00
parent 2215691125
commit f56d25e76d
2 changed files with 6 additions and 6 deletions

View File

@@ -387,7 +387,7 @@ func (p *PacketServerCompanyInfo) Read(b []byte) {
p.Name, _ = r.ReadString(0)
p.Name = p.Name[:len(p.Name)-1]
p.President, _ = r.ReadString(0)
p.President = p.Name[:len(p.Name)-1]
p.President = p.President[:len(p.President)-1]
c, _ = r.ReadByte()
p.Color = uint8(c)
c, _ = r.ReadByte()
@@ -417,7 +417,7 @@ func (p *PacketServerCompanyUpdate) Read(b []byte) {
p.Name, _ = r.ReadString(0)
p.Name = p.Name[:len(p.Name)-1]
p.President, _ = r.ReadString(0)
p.President = p.Name[:len(p.Name)-1]
p.President = p.President[:len(p.President)-1]
c, _ = r.ReadByte()
p.Color = uint8(c)
c, _ = r.ReadByte()