diff --git a/datagram.go b/datagram.go index 4dbf088..27a430e 100644 --- a/datagram.go +++ b/datagram.go @@ -19,9 +19,9 @@ type dataGram struct { func (g dataGram) String() string { if len(g.body) > 30 { - return fmt.Sprintf("{dataGram cmd: %v tick: %v size: %d body: %q...}", g.cmd, g.tick, len(g.body), g.body[:27]) + return fmt.Sprintf("{dataGram cmd: %v tick: %v size: %d body: %x...}", g.cmd, g.tick, len(g.body), g.body[:27]) } - return fmt.Sprintf("{dataGram cmd: %v tick: %v size: %d body: %q}", g.cmd, g.tick, len(g.body), g.body) + return fmt.Sprintf("{dataGram cmd: %v tick: %v size: %d body: %x}", g.cmd, g.tick, len(g.body), g.body) } func (g *dataGram) check(dump bool) error { diff --git a/entity.go b/entity.go index fb76cf1..59300ef 100644 --- a/entity.go +++ b/entity.go @@ -11,8 +11,8 @@ type entity struct { } func (e entity) String() string { - if len(e.body) < 32 { + if len(e.body) < 30 { return fmt.Sprintf("{entity type: %d size: %d data: %x}", e.t, e.size, e.body) } - return fmt.Sprintf("{entity type: %d size: %d data: %x...}", e.t, e.size, e.body[:32]) + return fmt.Sprintf("{entity type: %d size: %d data: %x...}", e.t, e.size, e.body[:27]) }