diff options
author | xskingdom <xskingdom@gmail.com> | 2021-02-24 13:38:41 +0800 |
---|---|---|
committer | xskingdom <xskingdom@gmail.com> | 2021-02-24 13:38:41 +0800 |
commit | 3c6f5dafdc58099800b6b8705c2d12f6d964de0b (patch) | |
tree | 5160b7398e51ea8602549b7922958ee820be1b89 /pkg/packet/bmp | |
parent | 65d094d7f25e7304832b104f429449cbcd22770d (diff) |
Fix ParseValue's bug for BMPStatsTLV32
Diffstat (limited to 'pkg/packet/bmp')
-rw-r--r-- | pkg/packet/bmp/bmp.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/packet/bmp/bmp.go b/pkg/packet/bmp/bmp.go index d111d251..a704b907 100644 --- a/pkg/packet/bmp/bmp.go +++ b/pkg/packet/bmp/bmp.go @@ -225,7 +225,7 @@ func (s *BMPStatsTLV32) ParseValue(data []byte) error { if s.Length != 4 { return fmt.Errorf("invalid length: %d bytes (%d bytes expected)", s.Length, 4) } - s.Value = binary.BigEndian.Uint32(data[:8]) + s.Value = binary.BigEndian.Uint32(data[:4]) return nil } |