diff --git a/include/libnyquist/Common.h b/include/libnyquist/Common.h index 01b884a..d7d6581 100644 --- a/include/libnyquist/Common.h +++ b/include/libnyquist/Common.h @@ -581,7 +581,7 @@ inline ChunkHeaderInfo ScanForChunk(const std::vector & fileData, uint3 // D[n] aligned to 16 bytes now const uint16_t * d = reinterpret_cast(fileData.data()); - for (size_t i = 0; i < fileData.size() / sizeof(uint16_t); i++) + for (size_t i = 0; i < fileData.size() / sizeof(uint16_t) - 3; i++) { // This will be in machine endianess uint32_t m = Pack(Read16(d[i]), Read16(d[i + 1]));