You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The require check in ByteParser.bytesToUint64 happens too early: The return value of the function that is only computed in the next row, is already checked when entering the function. As new variables seem to be initialized to zero, the check always succeeds, but misses its purpose.
function bytesToUint64(bytes memory data) public pure returns (uint64 value) {
require(value <= MAX_UINT64, "Number too large! Use `bytesToBigNumber` instead!");
value = uint64(bytesToBigNumber(data));
}
Fix: Move the require statement below the assignment.
The text was updated successfully, but these errors were encountered:
The require check in ByteParser.bytesToUint64 happens too early: The return value of the function that is only computed in the next row, is already checked when entering the function. As new variables seem to be initialized to zero, the check always succeeds, but misses its purpose.
Fix: Move the
require
statement below the assignment.The text was updated successfully, but these errors were encountered: