diff --git a/laymanshex.go b/laymanshex.go index bece35c..04bffd2 100644 --- a/laymanshex.go +++ b/laymanshex.go @@ -406,7 +406,12 @@ func getValues(descr fileDescription, binpath string) map[string]string { optPanic("failed to open binary", err) for i, part := range descr.parts { if part.name == "" { - _, err = f.Seek(part.handling.bytes, 1) + if i == len(descr.parts)-1 { + throwaway := make([]byte, part.handling.bytes) + _, err = f.Read(throwaway) + } else { + _, err = f.Seek(part.handling.bytes, 1) + } optPanic(seekErr(i, part.name, err), err) } else { vals[part.name] = part.handling.readFrom(f, descr.byteOrder)