diff --git a/contracts/LCPUtils.sol b/contracts/LCPUtils.sol index 6b85719..9692d59 100644 --- a/contracts/LCPUtils.sol +++ b/contracts/LCPUtils.sol @@ -17,7 +17,7 @@ library LCPUtils { pure returns (bytes memory bz, uint256 pos) { - pos = BytesUtils.find(src, offset, src.length, needle); + pos = BytesUtils.find(src, offset, src.length - offset, needle); if (pos == type(uint256).max) { revert LCPUtilsReadBytesUntilNotFound(); }