浏览代码

Revert memory pointer to storage pointer (#4550)

Francisco 2 年之前
父节点
当前提交
3266bca150
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      contracts/governance/extensions/GovernorVotesQuorumFraction.sol

+ 1 - 1
contracts/governance/extensions/GovernorVotesQuorumFraction.sol

@@ -49,7 +49,7 @@ abstract contract GovernorVotesQuorumFraction is GovernorVotes {
         uint256 length = _quorumNumeratorHistory._checkpoints.length;
 
         // Optimistic search, check the latest checkpoint
-        Checkpoints.Checkpoint208 memory latest = _quorumNumeratorHistory._checkpoints[length - 1];
+        Checkpoints.Checkpoint208 storage latest = _quorumNumeratorHistory._checkpoints[length - 1];
         uint48 latestKey = latest._key;
         uint208 latestValue = latest._value;
         if (latestKey <= timepoint) {