X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/7cd900d61edbd6d322db3cecb913adf574389320..6e4c02b1b9793776a52cf8b1f914eeadd2bbb4b5:/hotline/flattened_file_object.go diff --git a/hotline/flattened_file_object.go b/hotline/flattened_file_object.go index 6ccd9d7..c57de19 100644 --- a/hotline/flattened_file_object.go +++ b/hotline/flattened_file_object.go @@ -69,6 +69,7 @@ func (ffif *FlatFileInformationFork) friendlyCreator() []byte { } func (ffif *FlatFileInformationFork) setComment(comment []byte) error { + ffif.CommentSize = make([]byte, 2) ffif.Comment = comment binary.BigEndian.PutUint16(ffif.CommentSize, uint16(len(comment))) @@ -109,7 +110,7 @@ func (ffo *flattenedFileObject) TransferSize(offset int64) []byte { resForkSize := binary.BigEndian.Uint32(ffo.FlatFileResForkHeader.DataSize[:]) size := make([]byte, 4) - binary.BigEndian.PutUint32(size[:], dataSize+resForkSize+uint32(payloadSize)-uint32(offset)) + binary.BigEndian.PutUint32(size, dataSize+resForkSize+uint32(payloadSize)-uint32(offset)) return size }