Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cnpy.h
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ namespace cnpy {

//get the CRC of the data to be added
uint32_t crc = crc32(0L,(uint8_t*)&npy_header[0],npy_header.size());
crc = crc32(crc,(uint8_t*)data,nels*sizeof(T));

if (nels)
crc = crc32(crc,(uint8_t*)data,nels*sizeof(T));

//build the local header
std::vector<char> local_header;
Expand Down