From 92eb22018492e9a9e4837fac24b9534944a05ae3 Mon Sep 17 00:00:00 2001 From: Salvador Ortiz Date: Sat, 10 Aug 2013 09:42:19 +0200 Subject: [PATCH] ITS#7661 mdb_dbi_flags(): Allow main DBI --- libraries/liblmdb/mdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index abc4a82dee..a407edac7a 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -7903,7 +7903,7 @@ void mdb_dbi_close(MDB_env *env, MDB_dbi dbi) int mdb_dbi_flags(MDB_env *env, MDB_dbi dbi, unsigned int *flags) { /* We could return the flags for the FREE_DBI too but what's the point? */ - if (dbi <= MAIN_DBI || dbi >= env->me_numdbs) + if (dbi < MAIN_DBI || dbi >= env->me_numdbs) return EINVAL; *flags = env->me_dbflags[dbi]; return MDB_SUCCESS; -- 2.39.5