diff options
author | George Hazan <george.hazan@gmail.com> | 2014-01-03 12:19:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-01-03 12:19:42 +0000 |
commit | 23617c95e41dc21347d4957c29fe5989a36e2a85 (patch) | |
tree | 3a88d117557a7dd5f04863e82966225037c21853 /plugins/Db3x_mmap/src/dbheaders.cpp | |
parent | 6064262200ecd2cead6f706765e3049f559cfcd0 (diff) |
more correct way of writing signatures
git-svn-id: http://svn.miranda-ng.org/main/trunk@7477 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Db3x_mmap/src/dbheaders.cpp')
-rw-r--r-- | plugins/Db3x_mmap/src/dbheaders.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/plugins/Db3x_mmap/src/dbheaders.cpp b/plugins/Db3x_mmap/src/dbheaders.cpp index 5d19daaf35..97e7b915fe 100644 --- a/plugins/Db3x_mmap/src/dbheaders.cpp +++ b/plugins/Db3x_mmap/src/dbheaders.cpp @@ -65,6 +65,11 @@ int CDb3Base::CheckDbHeaders() if (m_dbHeader.ofsUser == 0)
return EGROKPRF_DAMAGED;
- m_bEncrypted = 0 == memcmp(m_dbHeader.signature, &dbSignatureE, sizeof(m_dbHeader.signature));
return 0;
}
+
+void CDb3Base::WriteSignature(DBSignature &sign)
+{
+ memcpy(&m_dbHeader.signature, &sign, sizeof(DBSignature));
+ DBWrite(0, &sign, sizeof(DBSignature));
+}
\ No newline at end of file |