db/hash.c: Fix flag check in hash_seq

Fixes:	3a686b851f
This commit is contained in:
Bojan Novković 2025-08-01 11:33:00 +02:00
parent 1c52229528
commit aa05d1b2ef

View file

@ -704,7 +704,7 @@ hash_seq(const DB *dbp, DBT *key, DBT *data, u_int32_t flag)
u_int16_t *bp, ndx;
hashp = (HTAB *)dbp->internal;
if (flag != R_FIRST || flag != R_NEXT) {
if (flag != R_FIRST && flag != R_NEXT) {
hashp->error = errno = EINVAL;
return (ERROR);
}