From e452215eb9390f9eedbacb53db0b666d27a90295 Mon Sep 17 00:00:00 2001 From: alvrs Date: Sat, 23 Sep 2023 16:39:45 +0100 Subject: [PATCH] reuse numStaticFields --- packages/store/src/StoreCore.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/store/src/StoreCore.sol b/packages/store/src/StoreCore.sol index 52ea2484a0..99c2b85927 100644 --- a/packages/store/src/StoreCore.sol +++ b/packages/store/src/StoreCore.sol @@ -656,7 +656,7 @@ library StoreCore { uint256 end ) internal view returns (bytes memory) { uint8 numStaticFields = uint8(fieldLayout.numStaticFields()); - if (fieldIndex < fieldLayout.numStaticFields()) { + if (fieldIndex < numStaticFields) { revert IStoreErrors.Store_NotDynamicField(); }