- for (ulong offset = 0; offset < n*blockLength/W+1; offset ++)
- {
- if (std::fwrite(this->data + offset, sizeof(ulong), 1, file) != 1)
- throw std::runtime_error("BlockArray::Save(): file write error (data).");
- }
+ if (std::fwrite(this->data, sizeof(ulong), n*blockLength/W+1, file) != n*blockLength/W+1)
+ throw std::runtime_error("BlockArray::Save(): file write error (data).");