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
Description: Description
The function _unpackCoordinates() contains if() condition that checks if:
if (_packedData.length!= _numberOfTriplets *6) {
// Invalid packed data lengthrevertCirclesArraysLengthMismatch(_packedData.length, _numberOfTriplets, 6);
}
However, incorrect error message is being reverted in CirclesArraysLengthMismatch(_packedData.length, _numberOfTriplets, 6);.
_numberOfTriplets is multiplied by 6 in the if condition, but in the error message, it is only _numberOfTriplets, causing a mismatch between the logic and the revert error.
Recommendation
To fix this, the revert error message should correctly reflect the logic as follows:
I know the CirclesArraysLengthMismatch error does not state that both values need to be equal, and it's technically impossible because _numberOfTriplets is always multiplied by 6. However, my point is that this error reverts due to incorrect mismatch values.
For example:
If _packedData.length = 12
and _numberOfTriplets = 3,
the function reverts due to this logic: 12 != 18 (3 * 6) => revert
However, the error message will show a mismatch between 12 and 3, while the actual logic compares 12 and 18.
This issue highlights the mismatch between the actual logic and the error message, and I think it can be classified as a Low severity issue.
Github username: --
Twitter username: --
Submission hash (on-chain): 0xb7c453dded125381b30b64a92528293a819041fa019bf5eb4e890399917b5bfc
Severity: low
Description:
Description
The function
_unpackCoordinates()
containsif()
condition that checks if:However, incorrect error message is being reverted in
CirclesArraysLengthMismatch(_packedData.length, _numberOfTriplets, 6);
._numberOfTriplets
is multiplied by 6 in the if condition, but in the error message, it is only_numberOfTriplets
, causing a mismatch between the logic and the revert error.Recommendation
To fix this, the revert error message should correctly reflect the logic as follows:
The text was updated successfully, but these errors were encountered: