summaryrefslogtreecommitdiff
path: root/plugins/Db3x_mmap/src/dbcrypt.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Db3x_mmap/src/dbcrypt.cpp')
-rw-r--r--plugins/Db3x_mmap/src/dbcrypt.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/Db3x_mmap/src/dbcrypt.cpp b/plugins/Db3x_mmap/src/dbcrypt.cpp
index 4cd24f2ee9..179698fb1f 100644
--- a/plugins/Db3x_mmap/src/dbcrypt.cpp
+++ b/plugins/Db3x_mmap/src/dbcrypt.cpp
@@ -167,12 +167,14 @@ LBL_SetNewKey:
FreeVariant(&dbv);
}
- if (memcmp(&m_dbHeader.signature, &dbSignature, sizeof(m_dbHeader.signature))) {
+ if (memcmp(&m_dbHeader.signature, &dbSignatureU, sizeof(m_dbHeader.signature)) &&
+ memcmp(&m_dbHeader.signature, &dbSignatureE, sizeof(m_dbHeader.signature)))
+ {
EnumModuleNames(sttModuleEnum, this);
// upgrade signature
- memcpy(&m_dbHeader.signature, &dbSignature, sizeof(dbSignature));
- DBWrite(0, &dbSignature, sizeof(dbSignature));
+ memcpy(&m_dbHeader.signature, &dbSignatureU, sizeof(dbSignatureU));
+ DBWrite(0, &dbSignatureU, sizeof(dbSignatureU));
}
InitDialogs();