Skip to content

Commit

Permalink
fix EntranceServer response on G5
Browse files Browse the repository at this point in the history
  • Loading branch information
sekaiwish committed Dec 31, 2023
1 parent 32dee90 commit 5a8bc3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/entranceserver/make_resp.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ func encodeServerInfo(config *_config.Config, s *Server, local bool) []byte {
combined := append(stringsupport.UTF8ToSJIS(si.Name), []byte{0x00}...)
combined = append(combined, stringsupport.UTF8ToSJIS(si.Description)...)
bf.WriteBytes(stringsupport.PaddedString(string(combined), 65, false))
} else if s.erupeConfig.RealClientMode <= _config.GG {
} else if s.erupeConfig.RealClientMode <= _config.G5 {
combined := append(stringsupport.UTF8ToSJIS(si.Name), []byte{0x00}...)
combined = append(combined, stringsupport.UTF8ToSJIS(si.Description)...)
bf.WriteUint8(uint8(len(combined)))
bf.WriteBytes(combined)
} else {
bf.WriteUint8(0) // Prevents malformed server name
bf.WriteUint8(0) // Ignored
combined := append(stringsupport.UTF8ToSJIS(si.Name), []byte{0x00}...)
combined = append(combined, stringsupport.UTF8ToSJIS(si.Description)...)
bf.WriteBytes(stringsupport.PaddedString(string(combined), 65, false))
Expand Down

0 comments on commit 5a8bc3b

Please sign in to comment.