summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/Db3x_mmap/src/dbintfm.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/plugins/Db3x_mmap/src/dbintfm.cpp b/plugins/Db3x_mmap/src/dbintfm.cpp
index 83d113e70c..0af9c6d79a 100644
--- a/plugins/Db3x_mmap/src/dbintfm.cpp
+++ b/plugins/Db3x_mmap/src/dbintfm.cpp
@@ -39,10 +39,17 @@ CDb3Mmap::~CDb3Mmap()
int CDb3Mmap::Load(bool bSkipInit)
{
int res = CDb3Base::Load(bSkipInit);
- if (!res && !bSkipInit)
- if (InitCrypt()) return 1;
+ if (res)
+ return res;
+
+ if (!memcmp(&m_dbHeader.signature, &dbSignatureSA, sizeof(m_dbHeader.signature)))
+ memcpy(&m_dbHeader.signature, &dbSignatureIM, sizeof(m_dbHeader.signature));
- return res;
+ if (!bSkipInit)
+ if (InitCrypt())
+ return EGROKPRF_CANTREAD;
+
+ return ERROR_SUCCESS;
}
int CDb3Mmap::PrepareCheck()