1
0
mirror of https://github.com/garraflavatra/go-fmp.git synced 2025-06-28 04:25:11 +00:00

Call readChunks

This commit is contained in:
2025-06-13 19:57:43 +02:00
parent f364ed7ede
commit ae32067c68

View File

@ -6,6 +6,9 @@ import (
) )
func (sect *FmpSector) readChunks() error { func (sect *FmpSector) readChunks() error {
if len(sect.Chunks) > 0 {
panic("chunks already read")
}
for { for {
pos := (sect.ID+2)*sectorSize - uint64(len(sect.Payload)) pos := (sect.ID+2)*sectorSize - uint64(len(sect.Payload))
@ -44,6 +47,7 @@ func (sect *FmpSector) readChunks() error {
} }
func (sect *FmpSector) processChunks(dict *FmpDict, currentPath *[]uint64) { func (sect *FmpSector) processChunks(dict *FmpDict, currentPath *[]uint64) {
sect.readChunks()
for _, chunk := range sect.Chunks { for _, chunk := range sect.Chunks {
switch chunk.Type { switch chunk.Type {
case FMP_CHUNK_PATH_PUSH: case FMP_CHUNK_PATH_PUSH: