mirror of
https://github.com/garraflavatra/go-fmp.git
synced 2025-06-28 04:25:11 +00:00
Fix
This commit is contained in:
@ -58,11 +58,11 @@ func (ctx *FmpFile) readChunk(payload []byte) (*FmpChunk, error) {
|
|||||||
chunk.Length = 4
|
chunk.Length = 4
|
||||||
|
|
||||||
case 0x0A, 0x0B, 0x0C, 0x0D:
|
case 0x0A, 0x0B, 0x0C, 0x0D:
|
||||||
valueLength := 2 * (payload[0] - 0x09)
|
valueLength := uint64(2 * (payload[0] - 0x09))
|
||||||
chunk.Type = FMP_CHUNK_SIMPLE_KEY_VALUE
|
chunk.Type = FMP_CHUNK_SIMPLE_KEY_VALUE
|
||||||
chunk.Key = parseVarUint64(payload[1 : 1+2])
|
chunk.Key = parseVarUint64(payload[1 : 1+2])
|
||||||
chunk.Value = payload[3 : 3+valueLength]
|
chunk.Value = payload[3 : 3+valueLength]
|
||||||
chunk.Length = 2 + uint64(valueLength)
|
chunk.Length = 3 + uint64(valueLength)
|
||||||
|
|
||||||
case 0x0E:
|
case 0x0E:
|
||||||
if payload[1] == 0xFE {
|
if payload[1] == 0xFE {
|
||||||
|
Reference in New Issue
Block a user