diff --git a/src/libraries/AssociatedLinkedListSetLib.sol b/src/libraries/AssociatedLinkedListSetLib.sol index b9bfade0d..2e008e232 100644 --- a/src/libraries/AssociatedLinkedListSetLib.sol +++ b/src/libraries/AssociatedLinkedListSetLib.sol @@ -182,9 +182,8 @@ library AssociatedLinkedListSetLib { bytes32 cursor = SENTINEL_VALUE; do { - bytes32 cleared = clearFlags(cursor); - StoragePointer cursorSlot = _mapLookup(keyBuffer, cleared); - bytes32 next = _load(cursorSlot); + StoragePointer cursorSlot = _mapLookup(keyBuffer, cursor); + bytes32 next = clearFlags(_load(cursorSlot)); _store(cursorSlot, bytes32(0)); cursor = next; } while (!isSentinel(cursor) && cursor != bytes32(0));