From: Derek Barnett Date: Thu, 8 Sep 2011 20:59:09 +0000 (-0700) Subject: Merge pull request #15 from gabeiscoding/patch-1 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=590fa357b9b9a8dfdad2f8dc0c3c113c3b26fbfe;hp=86e92576cd16354f09f6cbda6e6784d2d71d9399;p=bamtools.git Merge pull request #15 from gabeiscoding/patch-1 Bug discovered. The chunkStop was not being read from the correct offset --- diff --git a/src/api/internal/BamStandardIndex_p.cpp b/src/api/internal/BamStandardIndex_p.cpp index 8993d43..6d8273e 100644 --- a/src/api/internal/BamStandardIndex_p.cpp +++ b/src/api/internal/BamStandardIndex_p.cpp @@ -125,7 +125,7 @@ bool BamStandardIndex::CalculateCandidateOffsets(const BaiReferenceSummary& refS // read chunk start & stop from buffer memcpy((char*)&chunkStart, m_buffer+offset, sizeof(uint64_t)); offset += sizeof(uint64_t); - memcpy((char*)&chunkStop, m_buffer, sizeof(uint64_t)); + memcpy((char*)&chunkStop, m_buffer+offset, sizeof(uint64_t)); offset += sizeof(uint64_t); // swap endian-ness if necessary