summaryrefslogtreecommitdiffstats
path: root/common/storage_lmdb.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/storage_lmdb.cpp')
-rw-r--r--common/storage_lmdb.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/storage_lmdb.cpp b/common/storage_lmdb.cpp
index 3fee2a9..a007405 100644
--- a/common/storage_lmdb.cpp
+++ b/common/storage_lmdb.cpp
@@ -164,7 +164,7 @@ static bool createDbi(MDB_txn *transaction, const QByteArray &db, bool readOnly,
164 key.mv_size = db.size(); 164 key.mv_size = db.size();
165 //Store the flags without the create option 165 //Store the flags without the create option
166 const auto ba = QByteArray::number(flags); 166 const auto ba = QByteArray::number(flags);
167 value.mv_data = const_cast<void*>(static_cast<const void*>(db.constData())); 167 value.mv_data = const_cast<void*>(static_cast<const void*>(ba.constData()));
168 value.mv_size = db.size(); 168 value.mv_size = db.size();
169 if (const int rc = mdb_put(transaction, flagtableDbi, &key, &value, MDB_NOOVERWRITE)) { 169 if (const int rc = mdb_put(transaction, flagtableDbi, &key, &value, MDB_NOOVERWRITE)) {
170 //We expect this to fail if we're only creating the dbi but not the db 170 //We expect this to fail if we're only creating the dbi but not the db