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
This line should be "if(shortest - idx < 32){" otherwise we don't mask out the bits of the shortest string which aren't part of the string. Eg if we have two slices one with 33 bytes and one with 34 bytes the algorithm will compare the first 32 bytes then move on to the next 32 bytes, but shortest variable will be 33 so the current code will not mask out the last 31 bytes of this next chunk of memory.
This line should be "if(shortest - idx < 32){" otherwise we don't mask out the bits of the shortest string which aren't part of the string. Eg if we have two slices one with 33 bytes and one with 34 bytes the algorithm will compare the first 32 bytes then move on to the next 32 bytes, but shortest variable will be 33 so the current code will not mask out the last 31 bytes of this next chunk of memory.
solidity-stringutils/src/strings.sol
Line 215 in 3c63f18
The text was updated successfully, but these errors were encountered: