diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 7866e89..04a9f1c 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -4791,7 +4791,7 @@ fetchm: case MDB_PREV: case MDB_PREV_DUP: case MDB_PREV_NODUP: - if (!(mc->mc_flags & C_INITIALIZED) || (mc->mc_flags & C_EOF)) { + if (!(mc->mc_flags & C_INITIALIZED)) { rc = mdb_cursor_last(mc, key, data); mc->mc_flags |= C_INITIALIZED; mc->mc_ki[mc->mc_top]++; diff --git a/libraries/liblmdb/mtest.c b/libraries/liblmdb/mtest.c index 8c8dd57..42b8658 100644 --- a/libraries/liblmdb/mtest.c +++ b/libraries/liblmdb/mtest.c @@ -25,7 +25,7 @@ int main(int argc,char * argv[]) MDB_val key, data; MDB_txn *txn; MDB_stat mst; - MDB_cursor *cursor; + MDB_cursor *cursor, *cur2; int count; int *values; char sval[32]; @@ -54,7 +54,11 @@ int main(int argc,char * argv[]) for (i=0;i