mirror of
https://github.com/garraflavatra/go-fmp.git
synced 2025-06-28 04:25:11 +00:00
Fixes
This commit is contained in:
@ -2,10 +2,7 @@ package fmp
|
||||
|
||||
func parseVarUint64(payload []byte) uint64 {
|
||||
var length uint64
|
||||
n := len(payload)
|
||||
if n > 8 {
|
||||
n = 8 // clamp to max uint64
|
||||
}
|
||||
n := min(len(payload), 8) // clamp to uint64
|
||||
for i := range n {
|
||||
length <<= 8
|
||||
length |= uint64(payload[i])
|
||||
|
Reference in New Issue
Block a user