diff options
Diffstat (limited to 'plugins/Dbx_mdb/src/dbintf.cpp')
-rw-r--r-- | plugins/Dbx_mdb/src/dbintf.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdb/src/dbintf.cpp index e129bbd600..a9c798d2a4 100644 --- a/plugins/Dbx_mdb/src/dbintf.cpp +++ b/plugins/Dbx_mdb/src/dbintf.cpp @@ -104,13 +104,15 @@ int CDbxMdb::Load(bool bSkipInit) const DBHeader *hdr = (const DBHeader*)data.mv_data;
if (hdr->dwSignature != DBHEADER_SIGNATURE)
DatabaseCorruption(NULL);
+ if (hdr->dwVersion != DBHEADER_VERSION)
+ return EGROKPRF_OBSOLETE;
memcpy(&m_header, data.mv_data, sizeof(m_header));
}
else
{
m_header.dwSignature = DBHEADER_SIGNATURE;
- m_header.dwVersion = 1;
+ m_header.dwVersion = DBHEADER_VERSION;
data.mv_data = &m_header; data.mv_size = sizeof(m_header);
mdb_put(trnlck, m_dbGlobal, &key, &data, 0);
|