From 219405069c22a4a8ede051e836311273279b8fee Mon Sep 17 00:00:00 2001 From: Richard Thier Date: Mon, 27 Jan 2025 04:41:26 +0100 Subject: [PATCH] better this way with assert --- vmap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vmap.h b/vmap.h index 8dd90a4..0d9bf41 100644 --- a/vmap.h +++ b/vmap.h @@ -100,7 +100,8 @@ static inline vmap_find_res search_all_vmap(vmap *map, uint32_t key, vmap_find_r /* Rare edge-case when last lane element was returned and we continue from it */ /* We should not try lane processing, just jump next level - but only if there */ /* is a next level (so last checked lane was totally filled already to full cap. */ - if((prev.lane_abcd_next > 4) && (prev.last_found_lane_val != 0)) { + if(prev.lane_abcd_next > 4) { + assert(prev.last_found_lane_val != 0); prev = vmap_search_all_begin(); ++level; /* prev.level = level; // unnecessary, I hand-optimized out */