]> git.sur5r.net Git - openldap/commitdiff
ITS#7955, #7671 fix MDB_PREV_DUP
authorHoward Chu <hyc@symas.com>
Thu, 2 Oct 2014 20:58:20 +0000 (21:58 +0100)
committerHallvard Furuseth <hallvard@openldap.org>
Mon, 1 Dec 2014 19:15:36 +0000 (20:15 +0100)
libraries/liblmdb/mdb.c

index 81fe20510da17c7ac779805b8879d2d90e03d12a..a7659a5b3c8217399c37d32fb89d08e31925edf7 100644 (file)
@@ -5428,11 +5428,11 @@ mdb_cursor_prev(MDB_cursor *mc, MDB_val *key, MDB_val *data, MDB_cursor_op op)
                                        }
                                        return rc;
                                }
-                       } else {
-                               mc->mc_xcursor->mx_cursor.mc_flags &= ~(C_INITIALIZED|C_EOF);
-                               if (op == MDB_PREV_DUP)
-                                       return MDB_NOTFOUND;
                        }
+               } else {
+                       mc->mc_xcursor->mx_cursor.mc_flags &= ~(C_INITIALIZED|C_EOF);
+                       if (op == MDB_PREV_DUP)
+                               return MDB_NOTFOUND;
                }
        }