From db90fd795671eff90d9a6e6271fbdcac9c4947c9 Mon Sep 17 00:00:00 2001 From: Andrew James Date: Mon, 10 Oct 2022 08:03:28 +1100 Subject: [PATCH] remove sentinel check now that loop operates on known bounds Co-authored-by: Stephen C. Wills --- Source/items.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/items.cpp b/Source/items.cpp index 6b3fce73b..c9f6810fd 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -1875,7 +1875,7 @@ _item_indexes RndVendorItem(const Player &player, int minlvl, int maxlvl) static std::array<_item_indexes, 512> ril; size_t ri = 0; - for (std::underlying_type_t<_item_indexes> i = IDI_WARRIOR; i <= IDI_LAST && AllItemsList[i].iLoc != ILOC_INVALID; i++) { + for (std::underlying_type_t<_item_indexes> i = IDI_WARRIOR; i <= IDI_LAST; i++) { if (!IsItemAvailable(i)) continue; if (AllItemsList[i].iRnd == IDROP_NEVER)