summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hash.c b/hash.c
index b24740ec..2c915540 100644
--- a/hash.c
+++ b/hash.c
@@ -1341,11 +1341,11 @@ val hash_iter_peek(struct hash_iter *hi)
if (!h)
return nil;
- do {
+ while (index <= mask) {
val cell = hi->table->v.vec[index++];
if (cell)
return cell;
- } while (index <= mask);
+ }
return nil;
}