From c8fbb62f0701d1f7c8d6e0e2c01d4f5e08494d4b Mon Sep 17 00:00:00 2001 From: trivernis Date: Fri, 14 Feb 2020 23:52:11 +0100 Subject: [PATCH] Cleanup --- cryptpng.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptpng.go b/cryptpng.go index ac21bdb..1722f9a 100644 --- a/cryptpng.go +++ b/cryptpng.go @@ -114,13 +114,13 @@ func createChunk(data []byte, name string) ChunkData { rawLength := make([]byte, 4) binary.BigEndian.PutUint32(rawLength, uint32(len(data))) rawName := []byte(name) - dataAndName := make([]byte, 0) // len(rawName) + len(data) + dataAndName := make([]byte, 0) dataAndName = append(dataAndName, rawName...) dataAndName = append(dataAndName, data...) crc := crc32.ChecksumIEEE(dataAndName) rawCrc := make([]byte, 4) binary.BigEndian.PutUint32(rawCrc, crc) - fullData := make([]byte, 0) // len(rawLength) + len(dataAndName) + 4 + fullData := make([]byte, 0) fullData = append(fullData, rawLength...) fullData = append(fullData, dataAndName...) fullData = append(fullData, rawCrc...)