]> gitweb.hamatoma.de Git - crepublib/commitdiff
fix ReDirChecksum
authorhama <hama@siduction.net>
Mon, 2 Mar 2015 23:51:22 +0000 (00:51 +0100)
committerhama <hama@siduction.net>
Mon, 2 Mar 2015 23:51:22 +0000 (00:51 +0100)
base/ReSeqArray.cpp
math/ReRPD64.cpp
math/ReRPD64.hpp
os/ReDirTools.cpp

index 1f8df444a68ab5f8c3b2c1bd43b5df95a7fadea5..1e721ef49ab03bdfbc28b588fede6e51aeb105dc 100644 (file)
@@ -460,7 +460,7 @@ void ReSeqArray::set(Index index, const Byte* source, size_t sourceLength,
                if (currentLength >= sourceLength) {
                        // Use the existing space:
                        indexContent = seq->m_index;
-                       memcpy(m_content.buffer() + indexContent, source, sourceLength);
+                       memmove(m_content.buffer() + indexContent, source, sourceLength);
                        m_lost += currentLength - sourceLength;
                } else {
                        // New space must be allocated:
index 19598b0eb8afa51b2c9bb71fd13237679ede9257..6d613b373ca21daa6040c032e168680b8906b517 100644 (file)
@@ -220,7 +220,7 @@ void ReRPD64::reset() {
        m_c0 = 0x242070dbffff5bb1ll;\r
        m_d0 = 0xc1bdceee895cd7bell;\r
        memset(m_digest, 0, sizeof m_digest);\r
-       memset(m_waiting, 0, sizeof m_waiting);\r
+       memset(m_waiting, 0, m_chunkSize * 2);\r
        m_lengthWaiting = 0;\r
        m_length = 0;\r
        m_hexDigest.setLength(0);\r
index 8a4fa093a06ab78a76420e94ca70be602081f09f..e23722838bb6a64e9061a5d99b33d3baadef9d04 100644 (file)
@@ -30,7 +30,6 @@ private:
        uint64_t m_b0;
        uint64_t m_c0;
        uint64_t m_d0;
-       uint64_t m_salt;
 };
 
 #endif /* MATH_RERPD64_HPP_ */
index ca9c86e1f795bc3137582c403dbd2b35bbf7c56e..89b64c60f9c85688fec41c391c0b577c19d23874 100644 (file)
@@ -1160,7 +1160,7 @@ void ReDirChecksum::compareDir(const char* path, ReStringList& names,
                const char* storageFile){\r
        // forget the last line (checksum):\r
        int count = names.count() - 1;\r
-       names.remove(count - 1);\r
+       names.remove(count);\r
        for (int ii = 0; ii < count; ii++){\r
                const char* name = names.strOf(ii);\r
                const char* ptr = strchr(name, '\t');\r